Pstree Command--linux command application of large dictionary 729 commands interpretation

Source: Internet
Author: User

The content originates from the people's post and Telecommunications press "Linux command Application big dictionary"

tell 729 commands, 1935 examples

Learn about the Linux system's reference books, desk book, encountered the command or command not understand the options can be found

Strive to publish content every day



Pstree Command

use the pstree command to display the process tree of a running process. the pstree command Displays the tree structure in ASCII characters, clearly expressing the interrelationships between processes. If you do not specify a process number or user name, the first process at system startup is considered to be the base and all subsequent processes are displayed. If you specify a user name, the first process that belongs to that user is treated as a grass root and then all processes for that user are displayed.

Command syntax:

pstree[ Options ] [ process number | User ]

The meanings of the options in the command are as follows is shown.

table pstree command options meaning

Options

Meaning

-A

Display command line arguments

-A

Use ASCII Draw line character

-C

Do not compress identical subtrees

-H

Highlight the current process and its ancestors

-H < process number >

Highlight process number specified by process when its ancestor

-G

Use VT100 Dash character

-L

Do not truncate long lines

-N

Output sorted by process number

-P

Show process number

-U

Display user name transformations

-U

Use UTF-8(Unicode) dash character

-Z

Show SELinux Security Environment

Example : View the process tree.

[[Email protected]~]# pstree

Init─┬─networkmanager

├─abrtd

├─acpid

├─anacron

├─atd

├─AUDITD───{AUDITD}

├─automount───4*[{automount}]

├─bonobo-activati───{bonobo-activat}

├─certmonger

├─clock-applet

├─CONSOLE-KIT-DAE───63*[{CONSOLE-KIT-DA}]

├─crond

├─cupsd

├─2*[dbus-daemon───{dbus-daemon}]

├─2*[dbus-launch]

├─devkit-power-da

├─gconf-im-settin

├─gconfd-2

........................ (omitted)

Example : View the process tree and display the process number.

[[Email protected]~]# pstree-p

Init (1) ─┬─networkmanager (1427)

├─ABRTD (1771)

├─acpid (1544)

├─ATD (1790)

├─AUDITD (2101) ───{AUDITD} (2102)

├─automount (1625) ─┬─{automount} (1626)

│├─{automount} (1627)

│├─{automount} (1630)

│└─{automount} (1633)

├─bonobo-activati (2245) ───{bonobo-activat} (2246)

├─certmonger (1816)

├─clock-applet (2278)

├─console-kit-dae (1946) ─┬─{console-kit-da} (1947)

│├─{console-kit-da} (1948)

│├─{console-kit-da} (1949)

│├─{console-kit-da} (1950)

│├─{console-kit-da} (1951)

│├─{console-kit-da} (1952)

│├─{console-kit-da} (1953)

........................ (omitted)

Example : View The process name for the process number 1779 .

[[Email protected]~]# pstree 1779

Crond

Example : View The process of the GDM user.

[Email protected] ~]# Pstree GDM

Dbus-launch


This article is from the "airfish2000" blog, make sure to keep this source http://airfish2000.blog.51cto.com/10829608/1871746

Pstree Command--linux command application of large dictionary 729 commands interpretation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.