Cleaning up old processes on solo

To get a list of processes curently running execute:

ps -f -u {your username} for a fictitious username efudd
solo$ ps -f -u efudd
     UID   PID  PPID   C    STIME TTY         TIME CMD
   efudd 24021     1   0   Oct 11 ?           0:12 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/AMonitor -pid 24007 -session 0
   efudd 19649     1   9   Oct 09 ?        3374:01 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/Cosmos.bin -sch
   efudd 23583 23567   0        - ?           0:00 <default>
   efudd 19665 19649   0        - ?           0:00 <default>
   efudd  2190     1   0 15:32:20 ?           0:05 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/AMonitor -pid 2176 -session 0
   efudd  3897     1   0 10:53:23 pts/17      0:00 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/../../CosmosScope/bin/SUN.32/aimsh
   efudd 23567     1  10   Oct 11 ?        1328:50 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/Cosmos.bin -sch
   efudd 19800 19649   0        - ?           0:21 <default>
   efudd  3908  3907   0 10:59:12 ?           0:00 /usr/lib/ssh/sftp-server
   efudd 19663     1   0   Oct 09 ?           0:25 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/AMonitor -pid 19649 -session 0
   efudd 18616     1  11   Oct 08 ?        5015:21 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/Cosmos.bin -sch
   efudd  3900  3897   0 10:53:23 pts/17      0:01 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/../../CosmosScope/bin/../data/SUN.
   efudd  3814  3768   0 10:06:50 pts/16      0:00 -bash
   efudd  3855  3852   1 10:52:53 ?           0:56 /usr/lib/ssh/sshd
   efudd 24007     1  11   Oct 11 ?        1249:02 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/Cosmos.bin -sch
   efudd  4000  3859   1 11:14:01 pts/17      0:30 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/Cosmos.bin -sch
   efudd 24023 24007   0        - ?           0:00 <default>
   efudd  4013  4000   0 11:14:03 pts/17      0:00 /bin/sh -c /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/AMonitor -pid 4000 -ses
   efudd  4014  4013   0 11:14:03 pts/17      0:00 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/AMonitor -pid 4000 -session 0
   efudd  2176     1  11 15:32:18 ?         479:22 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/Cosmos.bin -sch
   efudd  3859  3856   0 10:52:54 pts/17      0:00 -bash
   efudd  3907  3904   0 10:59:12 ?           0:00 /usr/lib/ssh/sshd
   efudd 24028 24007   0        - ?           0:18 <default>
   efudd 23581     1   0   Oct 11 ?           0:13 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/AMonitor -pid 23567 -session 0
   efudd 18630     1   0   Oct 08 ?           0:33 /storage/synopsys/Cosmos-W2004.09/bin/SUN.64/AMonitor -pid 18616 -session 0
   efudd 18632 18616   0        - ?           0:00 <default>
   efudd  2192  2176   0        - ?           0:00 <default>
   efudd  3856  3855   0 10:52:53 ??          0:00 /usr/openwin/bin/xterm -ls -display solo:15.0
solo$
The processes listed above as <default> above are zombie processes. They have already died but thier parent process hasn't aknowledged their exit so they are waiting for the parent to either clean them up or exit. The processes sftp-server, sshd, -bash are associated with active logins and if killed may result in you having to re-connect to the system.

To kill a specific process execute:

kill -9 {PID}
Where {PID} is the process id and is in the second column of the output above.

To kill a group of processes:

pkill -9 {pattern}
Where pattern is a regular expression that matches against the command (CMD in the above listing).
For example:
pkill -9 Cosmos.bin
This command kills any processes with Cosmos.bin in the command line. Note a normal (non priveledged user) can only kill their own processes.

©2010 NSCEE