Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to swap out a job which is running...

0 views
Skip to first unread message

Helmut Springer

unread,
Nov 3, 1995, 3:00:00 AM11/3/95
to
Zhu Decai (zh...@spot.Colorado.EDU) wrote:
: I need to use my machine every now and then,but I do not want
: to kill someone's job. What I want to do is that I will force the big job
: to wait, sleep or be swapped out when I need the machine. Afterwards
: I'll put it back to run.

as root you can 'renice' a job, which means to give a lower priority
so that your machine hast time enough for you...

see 'man renice'

regards
delta

--
helmut 'delta' springer Computing Center Stuttgart University (RUS), FRG
de...@RUS.Uni-Stuttgart.DE InfoSystems, Unix/Net Consulting, StudBox
http://www.uni-stuttgart.de/delta/
phone : +49 711 1319-112 If you've got to do it,
FAX : +49 711 1319-203 do it with cold blood...

Timothy J. Hunt

unread,
Nov 3, 1995, 3:00:00 AM11/3/95
to
In article <47dl2g$k...@peabody.colorado.edu>,
Zhu Decai <zh...@spot.Colorado.EDU> wrote:
>Hello there,

>
> I need to use my machine every now and then,but I do not want
>to kill someone's job. What I want to do is that I will force the big job
>to wait, sleep or be swapped out when I need the machine. Afterwards
>I'll put it back to run.
>
> Do anyone know if superuser can do it? and How?


Yes. use renice.
man renice
for how :o)

Timothy
--
Timothy Hunt, System Admin Support Engineer, Unipalm PIPEX
216 The Science Park, Cambridge, CB4 4WA UK. +44(0)1223 250121/2 (Fax/Voice)
[Disclaimer: I said the above, not Unipalm PIPEX]
And my name is Timothy *not* Tim! *sigh*

Zhu Decai

unread,
Nov 3, 1995, 3:00:00 AM11/3/95
to
Hello there,

I have a Sparc station with SunOS, Someone is running a big
job on my machine. It almost takes all onboard memory, I can not
do anything with the machine.

I need to use my machine every now and then,but I do not want
to kill someone's job. What I want to do is that I will force the big job
to wait, sleep or be swapped out when I need the machine. Afterwards
I'll put it back to run.

Do anyone know if superuser can do it? and How?

Decai

Ross Alexander

unread,
Nov 3, 1995, 3:00:00 AM11/3/95
to
timo...@pipex.net (Timothy J. Hunt) writes:

>In article <47dl2g$k...@peabody.colorado.edu>,
>Zhu Decai <zh...@spot.Colorado.EDU> wrote:
>>Hello there,
>>

>> I need to use my machine every now and then,but I do not want
>>to kill someone's job. What I want to do is that I will force the big job
>>to wait, sleep or be swapped out when I need the machine. Afterwards
>>I'll put it back to run.
>>
>> Do anyone know if superuser can do it? and How?

>Yes. use renice.


>man renice
>for how :o)

On BSD derived unices, kill -STOP and kill -CONT may be a better way.
It's guaranteed to stop the job, and so you don't get swap-thrash
etc etc.

regards,
Ross


--
Ross Alexander, ve6pdq -- (403) 675 6311 -- r...@cs.athabascau.ca

Kurtis D. Rader

unread,
Nov 5, 1995, 3:00:00 AM11/5/95
to
timo...@pipex.net (Timothy J. Hunt) writes:

>In article <47dl2g$k...@peabody.colorado.edu>,
>Zhu Decai <zh...@spot.Colorado.EDU> wrote:
>>
>> I need to use my machine every now and then,but I do not want
>>to kill someone's job. What I want to do is that I will force the big job
>>to wait, sleep or be swapped out when I need the machine. Afterwards
>>I'll put it back to run.

>Yes. use renice.
>Timothy

Not every system has renice(1). Besides which, it allows you
to only slightly influence the scheduling of processes. It does
not allow you to completely stop a process. Most Unix'es provide
the STOP and CONT signals. Doing "kill -STOP <pid>" will suspend
the process. Later do a "kill -CONT <pid>" to put it back on the
scheduler's queue.
--
Kurtis D. Rader, Sr. Technical Consultant voice: 503/578-3714
Sequent Computer Systems fax: 503/578-5453
15450 SW Koll Parkway, M/S WIL1-541 UUCP: ...uunet!sequent!krader
Beaverton, OR 97006-6063 Internet: kra...@sequent.com

Timothy J. Hunt

unread,
Nov 5, 1995, 3:00:00 AM11/5/95
to
In article <1995Nov5....@sequent.com>,

Kurtis D. Rader <kra...@sequent.com> wrote:
>timo...@pipex.net (Timothy J. Hunt) writes:
>
>
>>Yes. use renice.
>>Timothy
>
>Not every system has renice(1). Besides which, it allows you

But in his posting he said he was using SunOS, which does :o)

and the advantage of using renice is that the user can still see (assumming
his program outputs something to a file) that it is working, whereas if the
process has been SIGSTOPped he might think it has a bug in it, kill it, and
start again.

0 new messages