OSU Navigation Bar

The Ohio State University

Department of Statistics

Cockins Hall
rollover image OSU Statistics
            Home

design element

OSU Statistics

Home

News

Research & Consulting Groups

People

For Visitors

For Prospective Students

For Current Students, Staff & Faculty

Contact Us



rollover image

For Current Students & Faculty

rollover image

Courses

rollover image

Links

rollover image

Computer Support

rollover image

Internal Documents

rollover image

webmail

Killing a Background Job

Okay, for some reason you get cut off when calling in, or you have a job that you need to kill. Often the shell or emacs will hang and need to be killed off manually.

First, figure out what tty you are on, so you don't kill yourself off:

mordor> tty
/dev/pts/27

Next, do a ps looking through all entries for you user name:

mordor> ps -ef | grep brian   (use your username)
brian  6923 6917  0 11:06:34 pts/27   0:01 -tcsh
brian  3005 3001  0 12:22:11 pts/13   0:01 -tcsh
brian  6924 6917  0 12:24:43 pts/27   0:01 grep brian
                                 ||
*notice* ------------------------||

The 27 corresponds to the /dev/pts/27, so, in this case, I don't kill off 6923, since it would log me out. But 3005 is fair game. So do a:

mordor> kill 3005

and again, just in case it didn't die:

mordor> kill 3005

in this case since it didn't tell us no such process, it didn't die, so we'll kill it again, twice, but a little stronger:

mordor> kill -9 3005
mordor> kill -9 3005
6917: No such process

And you're done. This will work for any process on the system that you own.

Renicing a Background Job

To renice a particular job, you need to do:
renice pid
where pid is the process id of a job. This can be found by doing a
ps -fu username
where username is your username. The pid is in the second column.

Or most simply to renice all of username's processes:
renice +10 -u username



If you have trouble accessing this page, or need an alternate format contact webmaster@stat.osu.edu.