pstree process management

Function: pstree command lists the current process, and their tree structure.

Format: pstree [Options] [pid | user]

The main options are as follows:

-a: Displays the command execution of the program and the complete set of parameters.

-c: Cancel program of the same name, the combined display.

-h: output processes the results highlight the program being executed.

-l: long format.

-n: PID to the size of the sort.

-p: display PID.

-u: UID information display.

-G: coding using a VT100 terminal display.

-U: using UTF-8 (Unicode) encoding display.

Description: Use the ps command to get accurate data, but the data is huge, this is an overview of the control system as a whole is not easy. pstree just to make up for this deficiency. It can display the current execution of the program in a tree structure. pstree supports specifying a particular program (PID) or a user (USER) as starting displayed.

Application examples are as follows.

Process started, it might produce one of their own child. Pstree run command can easily see that information. Superuser privileges to run pstree:

#init-+-apmd

| -etc

|-bdflush

|-gconfd-2

|-gdm-binary---gdm-binary-+-X

|                         `-startkde-+-kwrapper

|                                    `-ssh-agent

|-gpm

|-httpd---8*[httpd]

...... & c.

Command of the same name, the program will automatically merge all "| -httpd --- 8 * [httpd]" means that the system has eight httpd child process generated by the process.

Guess you like

Origin www.cnblogs.com/fanweisheng/p/11108962.html