Latest web development tutorials

Linux pstree command

Linux command Daquan Linux command Daquan

Linux pstree command will display all trips to the tree, the tree view will be in pid (if specified) or in init this basic itinerary for the root (root), if the specified user id, the tree will only owned by the user to display the trip.

Access: All users.

grammar

pstree [-a] [-c] [-h|-Hpid] [-l] [-n] [-p] [-u] [-G|-U] [pid|user]

or

pstree -V

Parameter Description:

  • -a Show full instructions and parameters of the trip, if it is to be replaced out of memory will travel parentheses
  • -c If there are duplicate names itinerary is listed separately (default is will be added in front of *)

Examples

Relationship display process

pstree
init-+-amd
|-apmd
|-atd
|-httpd---10*[httpd]
%pstree -p
init(1)-+-amd(447)
|-apmd(105)
|-atd(339)
%pstree -c
init-+-amd
|-apmd
|-atd
|-httpd-+-httpd
| |-httpd
| |-httpd
| |-httpd
....

Special show processes running

# pstree -apnh //显示进程间的关系

At the same time display a user name

# pstree -u //显示用户名称

Linux command Daquan Linux command Daquan