PTREE(1) User Commands PTREE(1) NNAAMMEE ppttrreeee - print process trees SSYYNNOOPPSSIISS ppttrreeee [--aa] [--cc] [--zz _z_o_n_e] [_p_i_d | _u_s_e_r]... DDEESSCCRRIIPPTTIIOONN The ppttrreeee utility prints the process trees containing the specified _p_i_ds or _u_s_e_rs, 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. OOPPTTIIOONNSS The following options are supported: --aa All. Print all processes, including children of process 0. --cc Contracts. Print process contract memberships in addition to parent-child relationships. See process(4). This option implies the --aa option. --zz _z_o_n_e Zones. Print only processes in the specified _z_o_n_e. Each zone IIDD can be specified as either a zone name or a numerical zone IIDD. This option is only useful when executed in the global zone. OOPPEERRAANNDDSS The following operands are supported: _p_i_d Process-id or a list of process-ids. ppttrreeee also accepts _/_p_r_o_c_/_n_n_n as a process-id, so the shell expansion _/_p_r_o_c_/_* can be used to specify all processes in the system. _u_s_e_r Username or list of usernames. Processes whose effective user IDs match those given are displayed. FFIILLEESS _/_p_r_o_c_/_* process files EEXXIITT SSTTAATTUUSS The ppttrreeee utility exits 0 on success, and >0 if an error occurs. EEXXAAMMPPLLEESS EExxaammppllee 11 Using ptree The following example prints the process tree (including children of process 0) for processes which match the command name sssshh: $ 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 IINNTTEERRFFAACCEE SSTTAABBIILLIITTYY Not-an-Interface SSEEEE AALLSSOO gcore(1), ldd(1), pargs(1), pgrep(1), pkill(1), plimit(1), pmap(1), ppgsz(1), preap(1), proc(1), ps(1), pwd(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) illumos January 12, 2019 illumos