Print this page
6535 Add pbind -e
Reviewed by: Mohamed Khalfella <khalfella@gmail.com>
Reviewed by: Cody Mello <melloc@joyent.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/pbind.1m.man.txt
+++ new/usr/src/man/man1m/pbind.1m.man.txt
1 1 PBIND(1M) Maintenance Commands PBIND(1M)
↓ open down ↓ |
1 lines elided |
↑ open up ↑ |
2 2
3 3
4 4
5 5 NAME
6 6 pbind - control and query bindings of processes or LWPs
7 7
8 8 SYNOPSIS
9 9 pbind -b processor_id pid [/lwpid]...
10 10
11 11
12 + pbind -e processor_id cmd [args...]
13 +
14 +
12 15 pbind [-q] [pid [/lwpid]]...
13 16
14 17
15 18 pbind -Q [processor_id]...
16 19
17 20
18 21 pbind -u pid [/lwpid]...
19 22
20 23
21 24 pbind -U [processor_id]...
22 25
23 26
24 27 DESCRIPTION
25 28 pbind controls and queries bindings of processes and LWPs (lightweight
26 29 processes) to processors. pbind can also remove processor bindings that
27 30 were previously established.
28 31
29 32
30 33 When an LWP is bound to a processor, it will be executed only by that
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
31 34 processor except when the LWP requires a resource that is provided only
32 35 by another processor. The binding is not exclusive, that is, the
33 36 processor is free to execute other LWPs as well.
34 37
35 38
36 39 Bindings are inherited, so new LWPs and processes created by a bound
37 40 LWP will have the same binding. Binding an interactive shell to a
38 41 processor, for example, binds all commands executed by the shell.
39 42
40 43
44 + The processor_id must be present and on-line. Use the psrinfo(1M)
45 + command to determine which processors are available.
46 +
47 +
41 48 Superusers may bind or unbind any process or LWP, while other users can
42 49 bind or unbind any process or LWP for which they have permission to
43 50 signal, that is, any process that has the same effective user ID as the
44 51 user.
45 52
46 53 OPTIONS
47 54 The following options are supported:
48 55
49 56 -b processor_id
50 - Binds all or a subset of the LWPs of the specified processes to the
51 - processor processor_id. Specify processor_id as the processor ID of
52 - the processor to be controlled or queried. processor_id must be
53 - present and on-line. Use the psrinfo command to determine whether
54 - or not processor_id is present and on-line. See psrinfo(1M).
57 + Binds all or a subset of the LWPs of the specified processes to
58 + processor_id.
55 59
56 60
61 + -e processor_id
62 + Execute a command while bound to processor_id.
63 +
64 +
57 65 -q
58 66 Displays the bindings of the specified processes or of all
59 67 processes. If a process is composed of multiple LWPs which have
60 68 different bindings and the LWPs are not explicitly specified, the
61 69 bindings of only one of the bound LWPs will be displayed. The
62 70 bindings of a subset of LWPs can be displayed by appending
63 71 "/lwpids" to the process IDs. Multiple LWPs may be selected using
64 72 "-" and "," delimiters. See EXAMPLES.
65 73
66 74
67 75 -Q
68 76 Displays the LWPs bound to the specified list of processors, or all
69 77 LWPs with processor bindings. For processes composed of multiple
70 78 LWPs, the bindings of individual LWPs will be displayed.
71 79
72 80
73 81 -u
74 82 Removes the bindings of all or a subset of the LWPs of the
75 83 specified processes, allowing them to be executed on any on-line
76 84 processor.
77 85
78 86
79 87 -U
80 88 Removes the bindings of all LWPs bound to the specified list of
81 89 processors, or to any processor if no argument is specified.
82 90
83 91
84 92 OPERANDS
85 93 The following operands are supported:
86 94
87 95 pid
88 96 The process ID of the process to be controlled or queried.
89 97
90 98
91 99 lwpid
92 100 The set of LWP IDs of the specified process to be controlled or
93 101 queried. The syntax for selecting LWP IDs is as follows:
94 102
↓ open down ↓ |
28 lines elided |
↑ open up ↑ |
95 103 2,3,4-8 LWP IDs 2, 3, and 4 through 8
96 104 -4 LWPs whose IDs are 4 or below
97 105 4- LWPs whose IDs are 4 or above
98 106
99 107
100 108
101 109 processor_id
102 110 The processor ID of the processor to be controlled or queried.
103 111
104 112
113 + cmd [args...]
114 + The command to execute along with optional arguments.
115 +
116 +
105 117 EXAMPLES
106 118 Example 1 Binding Processes
107 119
108 120
109 121 The following example binds processes 204 and 223 to processor 2:
110 122
111 123
112 124 example% pbind -b 2 204 223
113 125 process id 204: was 2, now 2
114 126 process id 223: was 3, now 2
115 127
116 128
117 129
118 130 Example 2 Unbinding a Process
119 131
120 132
121 133 The following example unbinds process 204:
122 134
123 135
124 136 example% pbind -u 204
125 137
126 138
127 139
128 140 Example 3 Querying Bindings
129 141
130 142
131 143 The following example queries bindings. It demonstrates that process 1
132 144 is bound to processor 0, process 149 has at least one LWP bound to
133 145 CPU3, and process 101 has no bound LWPs.
134 146
135 147
136 148 example% pbind -q 1 149 101
137 149 process id 1: 0
138 150 process id 149: 3
139 151 process id 101: not bound
140 152
141 153
142 154
143 155 Example 4 Querying LWP Bindings
144 156
145 157
146 158 The following example queries bindings of LWPs. It demonstrates that
147 159 LWP 1 of process 149 is bound to CPU3, and LWP 2 of process 149 is not
148 160 bound.
149 161
150 162
151 163 example% pbind -q 149/1-2
152 164 lwp id 149/1: 3
153 165 lwp id 149/2: not bound
154 166
155 167
156 168
157 169 Example 5 Querying LWP Bindings for Processor 2:
158 170
↓ open down ↓ |
44 lines elided |
↑ open up ↑ |
159 171
160 172 The following example queries all LWPs bound to processor 2:
161 173
162 174
163 175 example% pbind -Q 2
164 176 lwp id 149/4: 2
165 177 lwp id 149/5: 2
166 178
167 179
168 180
181 + Example 6 Executing a bound command:
182 +
183 +
184 + The following example executes ls while bound to processor 6:
185 +
186 +
187 + example% pbind -e 6 ls -la
188 +
189 +
190 +
169 191 EXIT STATUS
170 192 The following exit values are returned:
171 193
172 194 0
173 195 Successful completion.
174 196
175 197
176 198 >0
177 199 An error occurred.
178 200
179 201
180 202 SEE ALSO
181 203 psradm(1M), psrinfo(1M), psrset(1M), processor_bind(2),
182 204 processor_info(2), sysconf(3C), attributes(5)
183 205
184 206 DIAGNOSTICS
185 207 pbind: cannot query pid 31: No such process
186 208 The process specified did not exist or has exited.
↓ open down ↓ |
8 lines elided |
↑ open up ↑ |
187 209
188 210
189 211 pbind: cannot bind pid 31: Not owner
190 212 The user does not have permission to bind the process.
191 213
192 214
193 215 pbind: cannot bind pid 31: Invalid argument
194 216 The specified processor is not on-line.
195 217
196 218
219 + pbind: failed to exec cmd
220 + Could not resolve the cmd from PATH.
197 221
222 +
198 223
199 224 February 25, 2008 PBIND(1M)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX