Last Updated: February 25, 2016
·
966
· hauleth

Display process tree

Today I found that if you run ps with f BSD flag then you will get pretty process tree. Example:

$ ssh polluks ps xf
  PID TTY      STAT   TIME COMMAND
 6485 ?        SN     0:00 sshd: hauleth@notty                              
 6486 ?        RNs    0:00  \_ ps xf
 4424 ?        SNs    0:00 SCREEN
 4425 pts/25   SNs    0:00  \_ /bin/bash
 4676 pts/25   SN+    0:00      \_ make test
 5159 pts/25   SN+    0:00      |   \_ /bin/sh ./test.sh
 6447 pts/25   RN+    0:08      |       \_ ./selection 250000
 4677 pts/25   SN+    0:00      \_ mail -s S Done test@example.com

Pretty nice and kinda useful.

1 Response
Add your response

My mnemonic: ps fax

over 1 year ago ·