Posts

Showing posts with the label tree

View process tree

View process tree One way to get the current process tree is to use the PS command, like this: ps faux Another way is to use the command pstree which will give you a nicer output, like this: pstree -l -a the -l option enables the "long lines", by default lines will be truncated and the -a  option is for pstree to show the command line arguments of each process. There are other options that you can use, like the -p  which will display the IDs of each process. If you want to see the tree of a particular process you can pass the process PID to pstree: pstree -l -a 5567 If you dont know the PID of the process you want you can use the following method: pstree -l -a $(pidof cron) This will display cron and all of its children. You may also see the process tree of a particular user: pstree -l -a root download  file  now