Linux-pstree command

  
        

The pstree command shows the derived relationship between processes in a tree diagram, and the display effect is relatively intuitive.

The pstree command displays a tree of processes in a tree view. The ps command can display information about the processes that are currently running, but the relationship between them is not clear enough.

In the Linux system, the system call fork can create a child process, and the child process can also create a child process. The relationship between processes in the Linux system is a tree, and the root of the tree is the process PID 1 Init process.
Syntax

pstree (options) Options

-a: Display complete instructions for each program, including paths, parameters, or resident service flags; -c: Do not use streamlined Marking method; -G: Use the column drawing characters of the VT100 terminal; -h: When listing the tree diagram, specify the program currently executed; -H<Program ID pid>: Effect and specification of this parameter”- h” The parameters are similar, but the specified program is specifically marked; -l: display the tree view in long column format; -n: sort by program identification code. The presets are sorted by program name; -p: display program identification code pid; -u: display user name; -U: use UTF-8 column drawing characters; -V: display version information.

chestnuts
displays the current number of all processes and process id

 pstree -p shows all the details of all processes, experience the same process name can be compressed display 
< Pre>pstree -a
Copyright © Windows knowledge All Rights Reserved