Prints the process tree containing the specified process IDs or users.
proctree [ -a ] [ { ProcessID | User } ]
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.
-a | Include children of process 0 in the display. The default is to exclude them. |
ProcessID | Specifies the process id. |
User | Specifies the User. |
proctree 12312The output of this command might look like this:
4954 /usr/sbin/srcmstr 7224 /usr/sbin/inetd 5958 telnetd -a 13212 -sh 14718 ./proctree 13212
proctree -a 12312The 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
/proc | Contains the /proc filesystem. |
The proccred command, procfiles command, procflags command, procldd command, procmap command, procrun command, procsig command, procstack command, procstop command, procwait command, procwdx command.