You are not logged in.

#1 2013-06-14 08:12:35

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Freezing a task temporarily?

Let's say I am compiling a kernel in a terminal window. It is so CPU intensive, that using the computer while it's running is not really possible.

So is there any way I could pause such kernel compilation for the time while I'm in front of the computer, and unpause it when I'm leaving so it may continue where it stopped?

I know there is a PAUSE key on the keyboard, but it does nothing.

Offline

#2 2013-06-14 08:20:12

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Freezing a task temporarily?

I don't think you can pause, but you may use nice and ionice settings.

Offline

#3 2013-06-14 08:20:56

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,682

Re: Freezing a task temporarily?

man renice

Offline

#4 2013-06-14 08:24:38

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,238
Website

Re: Freezing a task temporarily?

You should be able to press CTRL Z to suspend the process if you're in bash. See "Job Control" for bash

EDIT: but I agree with the others, use nice/ionice to reduce the priority so the more interactive processes get priority to CPU and I/O.

Last edited by fukawi2 (2013-06-14 08:25:16)

Offline

#5 2013-06-14 08:31:31

mychris
Member
From: Munich
Registered: 2012-09-15
Posts: 68

Re: Freezing a task temporarily?

There is a STOP and CONT signal. See the man page for kill.
Never used those signals, so I'm not sure how the shell will handle these.

Offline

#6 2013-06-14 08:31:59

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: Freezing a task temporarily?

Offline

#7 2013-06-14 08:37:35

Lockheed
Member
Registered: 2010-03-16
Posts: 1,550

Re: Freezing a task temporarily?

fukawi2 wrote:

You should be able to press CTRL Z to suspend the process if you're in bash

That worked, I was able to suspend it with ctrl+z, and then resume it by typing "bg 1"

However, once I've done that, Ctrl+z no longer works.

Offline

#8 2013-06-14 11:58:52

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Freezing a task temporarily?

Because 'bg' sent the task to the background. You wanted to type 'fg'.

Offline

Board footer

Powered by FluxBB