PTREE(1)                                                              PTREE(1)



NAME
       ptree - display a process tree

SYNOPSIS
       ptree [-an] [pids | logins]
       ptree -h
       ptree -V

DESCRIPTION
       Ptree  outputs  a graph of the given processes with children indented 2
       spaces to the right of their immediate parent.  By  default  the  graph
       includes only children of init (process 1).

       The  output  graphs  include  each of the pids presented, any processes
       owned by each login requested, and any processes which link those  back
       to init, unless -n is given.  Each process is only output once.

       A pids list of dash (-) traces to the ptree process itself.

OPTIONS
       -a
              By  default  the  process  tree doesn't include system processes
              that are peers of init(8).  This option removes that injunction.

       -h
              Print only a brief help message.

       -n
              This  option  suppresses  the  trace  for  each target process's
              ancestors back towards init(8).  The output  will  only  contain
              descendant processes.

       -V
              Show only the standerd version banner.

EXAMPLES
       ptree $$
              Display  the process tree from this shell up to, but not includ-
              ing, init.

       ptree -a $$
              Same as above, but include (any peer of) init as well.

       ptree -a
              Show the whole of the process table, other than kernel  threads.

       ptree ksb
              Show all the processes running for the login "ksb".

       ptree -n 'pgrep cron'
              Graph the the descendants of the running cron(8) daemon.

       pgrep cron | xapply -f 'ptree -n' -
              A  better  version  of  the cron spell, as the lack of a running
              cron doesn't output a graph for the whole system.

       pgrep cron | xapply -f -N 'echo cron is dead%0' 'ptree -n' -
              Even better, report that cron is dead when that's the case.

BUGS
       None known.

AUTHOR
       Pete Fritchman and Kevin Braunsdorf
       NonPlayer character Guild
       ptree at ksb.npcguild.org.nospam

SEE ALSO
       sh(1), ps(1), pgrep(1), killall(1), xapply(1L), cron(8), pkill(1)



                                     LOCAL                            PTREE(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | BUGS | AUTHOR | SEE ALSO