Print this page
11691 ptree could show service FMRIs
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Jason King <jason.king@joyent.com>
Reviewed by: Andy Fiddaman <andy@omniosce.org>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1/ptree.1.man.txt
+++ new/usr/src/man/man1/ptree.1.man.txt
1 1 PTREE(1) User Commands PTREE(1)
2 2
3 3
4 4
5 5 NAME
6 6 ptree - print process trees
7 7
8 8 SYNOPSIS
9 - /usr/bin/ptree [-a] [-c] [-z zone] [pid | user]...
9 + /usr/bin/ptree [-a] [-c] [-s svc] [-z zone] [pid | user]...
10 10
11 11
12 12 DESCRIPTION
13 13 The ptree utility prints the process trees containing the specified
14 14 pids or users, with child processes indented from their respective
15 15 parent processes. An argument of all digits is taken to be a process-
16 16 ID, otherwise it is assumed to be a user login name. The default is all
17 17 processes.
18 18
19 19 OPTIONS
20 20 The following options are supported:
21 21
22 22 -a
23 23 All. Print all processes, including children of process 0.
24 24
25 25
26 26 -c
27 - Contracts. Print process contract memberships in addition to
28 - parent-child relationships. See process(4). This option
29 - implies the -a option.
27 + Contracts. Print process contract memberships and their
28 + associated SMF FMRIs, in addition to parent-child
29 + relationships. See process(4). This option implies the -a
30 + option.
30 31
31 32
33 + -s svc
34 + Print only processes with an SMF service FMRI matching the
35 + argument. The FMRI may be in truncated form (such as
36 + 'console-login'). This includes child processes even if they
37 + are not members of the service contract. See process(4).
38 +
39 +
32 40 -z zone
33 41 Zones. Print only processes in the specified zone. Each zone
34 42 ID can be specified as either a zone name or a numerical
35 43 zone ID.
36 44
37 45 This option is only useful when executed in the global zone.
38 46
39 47
40 48 OPERANDS
41 49 The following operands are supported:
42 50
43 51 pid
44 52 Process-id or a list of process-ids. ptree also accepts
45 53 /proc/nnn as a process-id, so the shell expansion /proc/* can
46 54 be used to specify all processes in the system.
47 55
48 56
49 57 user
50 58 Username or list of usernames. Processes whose effective user
51 59 IDs match those given are displayed.
52 60
53 61
54 62 EXAMPLES
55 63 Example 1 Using ptree
56 64
57 65
58 66 The following example prints the process tree (including children of
59 67 process 0) for processes which match the command name ssh:
60 68
61 69
62 70 $ ptree -a `pgrep ssh`
63 71 1 /sbin/init
64 72 100909 /usr/lib/ssh/sshd
65 73 569150 /usr/lib/ssh/sshd
66 74 569157 /usr/lib/ssh/sshd
67 75 569159 -ksh
68 76 569171 bash
69 77 569173 /bin/ksh
70 78 569193 bash
71 79
72 80
73 81
74 82 EXIT STATUS
75 83 The following exit values are returned:
76 84
77 85 0
78 86 Successful operation.
79 87
80 88
81 89 non-zero
82 90 An error has occurred.
83 91
84 92
85 93 FILES
86 94 /proc/*
87 95 process files
88 96
89 97
90 98 ATTRIBUTES
91 99 See attributes(5) for descriptions of the following attributes:
92 100
93 101
94 102
95 103
96 104 +--------------------+-----------------+
97 105 | ATTRIBUTE TYPE | ATTRIBUTE VALUE |
98 106 +--------------------+-----------------+
99 107 |Interface Stability | See below. |
100 108 +--------------------+-----------------+
101 109
102 110
↓ open down ↓ |
61 lines elided |
↑ open up ↑ |
103 111 The human readable output is Unstable. The options are Evolving.
104 112
105 113 SEE ALSO
106 114 gcore(1), ldd(1), pargs(1), pgrep(1), pkill(1), plimit(1), pmap(1),
107 115 preap(1), proc(1), ps(1), ppgsz(1), pwd(1), rlogin(1), time(1),
108 116 truss(1), wait(1), fcntl(2), fstat(2), setuid(2), dlopen(3C),
109 117 signal.h(3HEAD), core(4), proc(4), process(4), attributes(5), zones(5)
110 118
111 119
112 120
113 - October 11, 2005 PTREE(1)
121 + September 3, 2019 PTREE(1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX