ptree

man ptree
Reformatting page.  Please Wait... done
User Commands                                            ptree(1)
NAME
     ptree - print process trees
SYNOPSIS
     /usr/bin/ptree [-a] [-c] [-z zone] [pid | user] ...
DESCRIPTION
     The ptree utility prints the process  trees  containing  the
     specified  pids or users, with child processes 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 is all processes.
OPTIONS
     The following options are supported:
     -a              All. Print all processes, including children
                     of process 0.
     -c              Contracts. Print  process  contract  member-
                     ships  in addition to parent-child relation-
                     ships. See process(4).  This option  implies
                     the -a option.
     -z zone         Zones. Print only processes in the specified
                     zone.  Each  zone  ID  can  be  specified as
                     either a zone name or a numerical zone ID.
                     This option is only useful when executed  in
                     the global zone.
OPERANDS
     The following operands are supported:
     pid             Process-id or a list of  process-ids.  ptree
                     also  accepts  /proc/nnn as a process-id, so
                     the shell expansion /proc/* can be  used  to
                     specify all processes in the system.
     user            Username or  list  of  usernames.  Processes
                     whose  effective  user IDs match those given
                     are displayed.
SunOS 5.10          Last change: 11 Oct 2005                    1
User Commands                                            ptree(1)
EXAMPLES
     Example 1: Using ptree
     The following example prints  the  process  tree  (including
     children of process 0) for processes which match the command
     name ssh:
     $ ptree -a `pgrep ssh`
             1     /sbin/init
               100909 /usr/lib/ssh/sshd
                 569150 /usr/lib/ssh/sshd
                   569157 /usr/lib/ssh/sshd
                     569159 -ksh
                       569171 bash
                         569173 /bin/ksh
                           569193 bash
EXIT STATUS
     The following exit values are returned:
     0               Successful operation.
     non-zero        An error has occurred.
FILES
     /proc/*         process files
ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:
     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Availability                | SUNWesu                     |
    |_____________________________|_____________________________|
    | Interface Stability         | See below.                  |
    |_____________________________|_____________________________|
     The human readable  output  is  Unstable.  The  options  are
     Evolving.
SEE ALSO
     gcore(1), ldd(1), pargs(1), pgrep(1),  pkill(1),  plimit(1),
     pmap(1),   preap(1),   proc(1),   ps(1),  ppgsz(1),  pwd(1),
SunOS 5.10          Last change: 11 Oct 2005                    2
User Commands                                            ptree(1)
     rlogin(1), time(1), truss(1), wait(1),  fcntl(2),  fstat(2),
     setuid(2),  dlopen(3C),  signal.h(3HEAD),  core(4), proc(4),
     process(4), attributes(5), zones(5)
SunOS 5.10          Last change: 11 Oct 2005 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11976525/viewspace-670933/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11976525/viewspace-670933/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值