[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 4

proctree Command

Purpose

Prints the process tree containing the specified process IDs or users.

Syntax

proctree [ -a ] [ { ProcessID | User } ]

Description

The /proc filesystem provides a mechanism to control processes. It also gives access to information about the current state of processes and threads, but in binary form. The proctools commands provide ascii reports based on some of the available information.

Most of the commands take a list of process IDs or /proc/ProcessID strings as input. The shell expansion /proc/* can therefore be used to specify all processes in the system.

Each of the proctools commands gathers information from /proc for the specified processes and displays it to the user. The proctools commands like procrun and procstop start and stop a process using the /proc interface.

The information gathered by the commands from /proc is a snapshot of the current state of processes, and therefore can vary at any instant except for stopped processes.

The proctree command prints the process tree containing the specified process IDs or users. The child processes are indented from their respective parent processes. An argument of all digits is taken to be a process ID, otherwise it is assumed to be a user login name. The default action is to report on all processes, except children of process 0.

Flags

-a Include children of process 0 in the display. The default is to exclude them.
ProcessID Specifies the process id.
User Specifies the User.

Examples

  1. To display the ancestors and all the children of process 12312, enter:
    proctree 12312
    The output of this command might look like this:
    4954    /usr/sbin/srcmstr                     
       7224    /usr/sbin/inetd                    
          5958    telnetd -a                      
             13212    -sh                         
                14718    ./proctree 13212
  2. To display the ancestors and children of process 12312, including children of process 0, enter:
    proctree -a 12312
    The output of this command might look like this:
    1    /etc/init                                  
       4954    /usr/sbin/srcmstr                    
          7224    /usr/sbin/inetd                   
             5958    telnetd -a                     
                13212    -sh                        
                   14724    ./proctree -a 13212

Files

/proc Contains the /proc filesystem.

Related Information

The proccred command, procfiles command, procflags command, procldd command, procmap command, procrun command, procsig command, procstack command, procstop command, procwait command, procwdx command.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]