Processes: ps



next up previous contents index
Next: Job Statistics: vmstat Up: Managing the System Previous: Managing the System

Processes: ps

You run a ps command with options to check that all system processes were successfully started. The specific processes vary from system to system, but a standard list should include: init, cron, syslogd, getty, inetd, biod, and nsfd. For example, here is a somewhat abbreviated sample:   

$ ps -ef   	Full report on processes    
 UID   PID  PPID   C   STIME     TTY  TIME CMD   	   
root     1     0   0   Oct 04      - 130:49 /etc/init   	   
root  2039     1   0   Oct 04      - 33:26 /etc/syncd 60   	    
root  3321     1   0   Oct 04      -  1:57 /usr/lib/errdemon   	    
root  3709  5941   0   Oct 04      -  0:00 /usr/lpd/lpd   	    
root  4206     1   0   Oct 04     49:13 /etc/cron   	    
tim   5567 26302   0   Feb 22  pts/1  0:07 /bin/ksh    	   
root  6974  5941   0   Oct 04       1:51 /etc/syslogd   	    
root  7233  5941   0   Oct 04      -  0:12 /usr/lib/sendmail   	    
root  7492  5941   0   Oct 04      -  0:00 /usr/etc/portmap    	   
root  7751  5941   0   Oct 04      - 11:43 /etc/inetd   	   
ghe   9434  4825   0 01:19:38  pts/5  0:00 -ksh   	   
lu    10007 18140   0 12:29:19 pts/16  0:00 vi t2b.pot   	    
root 12390     1   0   Oct 04      -  4:28 /usr/etc/nfsd 8   	    
root 12647  5941   0   Oct 04      -  0:00 /usr/etc/rpc.mountd   	    
root 12905  5941   0   Oct 04      -  0:00 /usr/etc/rpc.statd   	    
root 13163  5941   0   Oct 04      -  0:00 /usr/etc/rpc.lockd   	     
loren 9462 28395   8 14:30:04 pts/10  0:00 /bin/ps -af -ef   	    

You may also use the ps command to find processes that should be removed. As an example, it is common to find processes that users have stopped, perhaps by using Ctrl-z, and then forgotten. There may also be processes that should have been killed, such as a program that was running when a window was killed or a numerical program stuck in a loop, but are still running and still consuming system resources. You remove these processes by reading the pid number from the listing and then issuing the kill command:

$ kill pid   	Kill process.   
$ kill -9 9462   	A severe kill of loren's process.    



next up previous contents index
Next: Job Statistics: vmstat Up: Managing the System Previous: Managing the System