piss - Sample Output

This tool sorts the output of ps(1) in a form that shows the process parenting hierarchy. It also has a 'grep' feature that uses command line arguments as regex search strings.

% piss
1      root     init [3] 
|--2      root     (kflushd)
|--3      root     (kswapd)
|--4      root     (nfsiod)
|--5      root     (nfsiod)
|--6      root     (nfsiod)
|--7      root     (nfsiod)
|--25     root     kerneld 
|--121    root     syslogd 
|--130    root     klogd 
|--141    root     crond 
|--153    root     inetd 
|  |--4316   root     -a 
|  |  |--4317   erco     login -p -h howland erco.com -f erco 
|  |     |--4318   erco     -tcsh 
|  |     
|  |--7497   root     -a 
|  |  |--7498   erco     login -p -h howland erco.com -f erco 
|  |     |--7499   erco     -tcsh 
|  |     
|  |--7915   root     -a 
|  |  |--7916   erco     login -p -h howland erco.com -f erco 
|  |     |--7917   erco     -tcsh 
|  |        |--11142  erco     nawk -f /home/bin/piss 
|  |           |--11147  erco     ps -laxww 
|  |           
|  |--29160  erco     tcsh -c rcp -t /usr/tmp 
|     |--29168  erco     rcp -t /usr/tmp 
|     
|--164    root     lpd 
|--178    root     sendmail: accepting connections on port 25                                                                                                                               
|--190    root     gpm -t ms 
|--194    root     httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--10008  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--10073  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--10453  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--10459  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--10479  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--10483  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--10565  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--10568  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  |--11123  www      httpd -d /home/www -f /etc/httpd/conf/httpd.conf 
|  
|--210    root     login -- root 
|  |--237    root     -tcsh 
|  
|--211    root     mingetty tty2 
|--212    root     mingetty tty3 
|--213    root     mingetty tty4 
|--214    root     mingetty tty5 
|--215    root     mingetty tty6 
|--216    root     tcsh -f /home/local/bin/lpflush 
|  |--11141  root     sleep 60 
|  
|--217    root     getty ttyS0 38400 vt100 
|--219    root     update (bdflush) 


% piss erco
29160  erco     tcsh -c rcp -t /usr/tmp 
|--29168  erco     rcp -t /usr/tmp 

4317   erco     login -p -h howland erco.com -f erco 
|--4318   erco     -tcsh 

7498   erco     login -p -h howland erco.com -f erco 
|--7499   erco     -tcsh 

7916   erco     login -p -h howland erco.com -f erco 
|--7917   erco     -tcsh 
   |--11150  erco     nawk -f /home/bin/piss erco 
      |--11155  erco     ps -laxww 

% piss tcsh
216    root     tcsh -f /home/local/bin/lpflush 
29160  erco     tcsh -c rcp -t /usr/tmp 
237    root     -tcsh 
4318   erco     -tcsh 
7499   erco     -tcsh 
7917   erco     -tcsh 
|--11179  erco     nawk -f piss tcsh