the pstree command is used to display processes in tree format.
$pstree [options] [pid or username]
Sr.No |
Options |
Descriptions |
---|---|---|
01 |
-p |
will tell pstree to show a PID in parenthesis after each process name. ps, in contrast to pstree, shows PIDs by default. |
02 |
-n |
The -n option instructs pstree to sort its output in the order of the PIDs instead of in the default alphabetic order |
03 |
-h |
option highlights (or shows in bold) the current process and all of its ancestors |
Example
$pstree root