Linux Tips and Tricks

Linux Tips and Tricks

pstree command

December19

ps command:

This command is used to check the process running on the server. " ps " command will list all the running process with there respective process ID.

pstree command:

This command is also used the check the process on the server. " pstree " command will list all the running process in the form of a tree structure.

init─┬─NetworkManager─┬─dhclient
     │                └─2*[{NetworkManager}]
     ├─abrtd
     ├─acpid
     ├─atd
     ├─auditd─┬─audispd─┬─sedispatch
     │        │         └─{audispd}
     │        └─{auditd}
     ├─avahi-daemon───avahi-daemon
     ├─bluetoothd
     ├─bonobo-activati───2*[{bonobo-activat}]
     ├─clock-applet───{clock-applet}
     ├─console-kit-dae───4*[{console-kit-da}]
     ├─crond
     ├─cupsd
 

Also try the -p option for pstree

[kamaraj@Kamaraj ~]$ pstree -p
init(1)─┬─NetworkManager(1160)─┬─dhclient(2091)
        │                      ├─{NetworkManager}(1174)
        │                      └─{NetworkManager}(2092)
        ├─abrtd(1441)
        ├─acpid(1288)
        ├─atd(1474)
        ├─auditd(1629)─┬─audispd(1631)─┬─sedispatch(1643)
        │              │               └─{audispd}(1644)
        │              └─{auditd}(1630)
        ├─avahi-daemon(1178)───avahi-daemon(1179)
        ├─bluetoothd(1388)
        ├─bonobo-activati(1824)─┬─{bonobo-activat}(1832)
        │                       └─{bonobo-activat}(1933)
        ├─clock-applet(2069)───{clock-applet}(2074)
        ├─console-kit-dae(1532)─┬─{console-kit-da}(1533)
        │                       ├─{console-kit-da}(1534)
        │                       ├─{console-kit-da}(1536)
 

posted under Uncategorized

Email will not be published

Website example

Your Comment:


Recent Comments

    Categories