[SLUG] ps and top

Stephen O'Neill soneill84 at yahoo.co.uk
Tue Nov 7 10:37:36 GMT 2006


Hi,

Re killing processes:

Just putting my limited knowledge of ps and top on here for posterity. I
have seen Gavin do something nifty in the past whereby you can kill a
process by name in a single line, I hope he or someone else can
enlighten us.

Anyway the "top" command gives a list of processes sorted by CPU usage.
The process id (PID) is in the first column.

Alternatively "ps" lists all processes and you can do what you like with
this text stream. E.g. to find the PID of blender you could pipe the
output to grep:

$ ps -ef | grep blender

Once you know the PID you can use the "kill" command. This is kind of
the equivalent of "right click, end task" in Windows' task manager:

$ kill 1234

I think that the command I saw Gavin using was "killall" which kills
processes by name. I would advise caution here as it can use regular
expressions - such that "killall -r city" would kill processes called
"metacity" and "audacity".

I haven't played further though.

Steve O
Send instant messages to your online friends http://uk.messenger.yahoo.com 





More information about the Scarborough mailing list