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
+++ new/usr/src/man/man1m/pbind.1m
1 1 '\" te
2 +.\" Copyright 2015 Ryan Zezeski
2 3 .\" Copyright (c) 2008, Sun Microsystems, Inc.
3 4 .\" All Rights Reserved
4 5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 7 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 8 .TH PBIND 1M "Feb 25, 2008"
8 9 .SH NAME
9 10 pbind \- control and query bindings of processes or LWPs
10 11 .SH SYNOPSIS
11 12 .LP
12 13 .nf
13 14 \fBpbind\fR \fB-b\fR \fIprocessor_id\fR \fIpid\fR [\fI/lwpid\fR]...
14 15 .fi
15 16
16 17 .LP
17 18 .nf
19 +\fBpbind\fR \fB-e\fR \fIprocessor_id\fR \fIcmd\fR [\fIargs\fR...]
20 +.fi
21 +
22 +.LP
23 +.nf
18 24 \fBpbind\fR [\fB-q\fR] [\fIpid\fR [\fI/lwpid\fR]]...
19 25 .fi
20 26
21 27 .LP
22 28 .nf
23 29 \fBpbind\fR \fB-Q\fR [\fIprocessor_id\fR]...
24 30 .fi
25 31
26 32 .LP
27 33 .nf
28 34 \fBpbind\fR \fB-u\fR \fIpid\fR [\fI/lwpid\fR]...
29 35 .fi
30 36
31 37 .LP
32 38 .nf
33 39 \fBpbind\fR \fB-U\fR [\fIprocessor_id\fR]...
34 40 .fi
35 41
36 42 .SH DESCRIPTION
37 -.sp
38 43 .LP
39 44 \fBpbind\fR controls and queries bindings of processes and LWPs (lightweight
40 45 processes) to processors. \fBpbind\fR can also remove processor bindings that
41 46 were previously established.
42 47 .sp
43 48 .LP
44 49 When an LWP is bound to a processor, it will be executed only by that processor
45 50 except when the LWP requires a resource that is provided only by another
46 51 processor. The binding is not exclusive, that is, the processor is free to
47 52 execute other LWPs as well.
48 53 .sp
49 54 .LP
50 55 Bindings are inherited, so new LWPs and processes created by a bound LWP will
51 56 have the same binding. Binding an interactive shell to a processor, for
52 57 example, binds all commands executed by the shell.
53 58 .sp
54 59 .LP
60 +The \fIprocessor_id\fR must be present and on-line. Use the
61 +\fBpsrinfo(1M)\fR command to determine which processors are
62 +available.
63 +.sp
64 +.LP
55 65 Superusers may bind or unbind any process or LWP, while other users can bind or
56 66 unbind any process or LWP for which they have permission to signal, that is,
57 67 any process that has the same effective user ID as the user.
58 68 .SH OPTIONS
59 -.sp
60 69 .LP
61 70 The following options are supported:
62 71 .sp
63 72 .ne 2
64 73 .na
65 74 \fB\fB-b\fR \fIprocessor_id\fR\fR
66 75 .ad
67 76 .sp .6
68 77 .RS 4n
69 -Binds all or a subset of the LWPs of the specified processes to the processor
70 -\fIprocessor_id\fR. Specify \fIprocessor_id\fR as the processor \fBID\fR of the
71 -processor to be controlled or queried. \fIprocessor_id\fR must be present and
72 -on-line. Use the \fBpsrinfo\fR command to determine whether or not
73 -\fIprocessor_id\fR is present and on-line. See \fBpsrinfo\fR(1M).
78 +Binds all or a subset of the LWPs of the specified processes to
79 +\fIprocessor_id\fR.
74 80 .RE
75 81
76 82 .sp
77 83 .ne 2
78 84 .na
85 +\fB-e\fR \fIprocessor_id\fR
86 +.ad
87 +.sp .6
88 +.RS 4n
89 +Execute a command while bound to \fIprocessor_id\fR.
90 +.RE
91 +
92 +.sp
93 +.ne 2
94 +.na
79 95 \fB\fB-q\fR\fR
80 96 .ad
81 97 .sp .6
82 98 .RS 4n
83 99 Displays the bindings of the specified processes or of all processes. If a
84 100 process is composed of multiple LWPs which have different bindings and the LWPs
85 101 are not explicitly specified, the bindings of only one of the bound LWPs will
86 102 be displayed. The bindings of a subset of LWPs can be displayed by appending
87 103 "/lwpids" to the process \fBID\fRs. Multiple LWPs may be selected using "-" and
88 104 "," delimiters. See EXAMPLES.
89 105 .RE
90 106
91 107 .sp
92 108 .ne 2
93 109 .na
94 110 \fB\fB-Q\fR\fR
95 111 .ad
96 112 .sp .6
97 113 .RS 4n
98 114 Displays the LWPs bound to the specified list of processors, or all LWPs with
99 115 processor bindings. For processes composed of multiple LWPs, the bindings of
100 116 individual LWPs will be displayed.
101 117 .RE
102 118
103 119 .sp
104 120 .ne 2
105 121 .na
106 122 \fB\fB-u\fR\fR
107 123 .ad
108 124 .sp .6
109 125 .RS 4n
110 126 Removes the bindings of all or a subset of the LWPs of the specified processes,
111 127 allowing them to be executed on any on-line processor.
112 128 .RE
113 129
114 130 .sp
115 131 .ne 2
↓ open down ↓ |
27 lines elided |
↑ open up ↑ |
116 132 .na
117 133 \fB\fB-U\fR\fR
118 134 .ad
119 135 .sp .6
120 136 .RS 4n
121 137 Removes the bindings of all LWPs bound to the specified list of processors, or
122 138 to any processor if no argument is specified.
123 139 .RE
124 140
125 141 .SH OPERANDS
126 -.sp
127 142 .LP
128 143 The following operands are supported:
129 144 .sp
130 145 .ne 2
131 146 .na
132 147 \fB\fIpid\fR\fR
133 148 .ad
134 149 .sp .6
135 150 .RS 4n
136 151 The process \fBID\fR of the process to be controlled or queried.
137 152 .RE
138 153
139 154 .sp
140 155 .ne 2
141 156 .na
142 157 \fB\fIlwpid\fR\fR
143 158 .ad
144 159 .sp .6
145 160 .RS 4n
146 161 The set of LWP IDs of the specified process to be controlled or queried. The
147 162 syntax for selecting \fBLWP\fR \fBID\fRs is as follows:
148 163 .sp
149 164 .in +2
150 165 .nf
151 166 2,3,4-8 LWP IDs 2, 3, and 4 through 8
152 167 -4 LWPs whose IDs are 4 or below
153 168 4- LWPs whose IDs are 4 or above
154 169 .fi
155 170 .in -2
156 171
157 172 .RE
158 173
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
159 174 .sp
160 175 .ne 2
161 176 .na
162 177 \fB\fIprocessor_id\fR\fR
163 178 .ad
164 179 .sp .6
165 180 .RS 4n
166 181 The processor \fBID\fR of the processor to be controlled or queried.
167 182 .RE
168 183
184 +.sp
185 +.ne 2
186 +.na
187 +\fB\fIcmd\fR \fI[args...]\fR
188 +.ad
189 +.sp .6
190 +.RS 4n
191 +The command to execute along with optional arguments.
192 +.RE
193 +
169 194 .SH EXAMPLES
170 195 .LP
171 196 \fBExample 1 \fRBinding Processes
172 197 .sp
173 198 .LP
174 199 The following example binds processes 204 and 223 to processor 2:
175 200
176 201 .sp
177 202 .in +2
178 203 .nf
179 204 example% \fBpbind -b 2 204 223\fR
180 205 process id 204: was 2, now 2
181 206 process id 223: was 3, now 2
182 207 .fi
183 208 .in -2
184 209 .sp
185 210
186 211 .LP
187 212 \fBExample 2 \fRUnbinding a Process
188 213 .sp
189 214 .LP
190 215 The following example unbinds process 204:
191 216
192 217 .sp
193 218 .in +2
194 219 .nf
195 220 example% \fBpbind -u 204\fR
196 221 .fi
197 222 .in -2
198 223 .sp
199 224
200 225 .LP
201 226 \fBExample 3 \fRQuerying Bindings
202 227 .sp
203 228 .LP
204 229 The following example queries bindings. It demonstrates that process 1 is bound
205 230 to processor 0, process 149 has at least one LWP bound to CPU3, and process 101
206 231 has no bound LWPs.
207 232
208 233 .sp
209 234 .in +2
210 235 .nf
211 236 example% \fBpbind -q 1 149 101\fR
212 237 process id 1: 0
213 238 process id 149: 3
214 239 process id 101: not bound
215 240 .fi
216 241 .in -2
217 242 .sp
218 243
219 244 .LP
220 245 \fBExample 4 \fRQuerying LWP Bindings
221 246 .sp
222 247 .LP
223 248 The following example queries bindings of LWPs. It demonstrates that LWP 1 of
224 249 process 149 is bound to CPU3, and LWP 2 of process 149 is not bound.
225 250
226 251 .sp
227 252 .in +2
228 253 .nf
229 254 example% \fBpbind -q 149/1-2\fR
230 255 lwp id 149/1: 3
231 256 lwp id 149/2: not bound
232 257 .fi
233 258 .in -2
234 259 .sp
235 260
236 261 .LP
237 262 \fBExample 5 \fRQuerying LWP Bindings for Processor 2:
238 263 .sp
239 264 .LP
240 265 The following example queries all LWPs bound to processor 2:
241 266
↓ open down ↓ |
63 lines elided |
↑ open up ↑ |
242 267 .sp
243 268 .in +2
244 269 .nf
245 270 example% \fBpbind -Q 2\fR
246 271 lwp id 149/4: 2
247 272 lwp id 149/5: 2
248 273 .fi
249 274 .in -2
250 275 .sp
251 276
252 -.SH EXIT STATUS
277 +.LP
278 +\fBExample 6 \fRExecuting a bound command:
253 279 .sp
254 280 .LP
281 +The following example executes ls while bound to processor 6:
282 +
283 +.sp
284 +.in +2
285 +.nf
286 +example% \fBpbind -e 6 ls -la
287 +.fi
288 +.in -2
289 +.sp
290 +
291 +.SH EXIT STATUS
292 +.LP
255 293 The following exit values are returned:
256 294 .sp
257 295 .ne 2
258 296 .na
259 297 \fB\fB0\fR\fR
260 298 .ad
261 299 .sp .6
262 300 .RS 4n
263 301 Successful completion.
264 302 .RE
265 303
266 304 .sp
↓ open down ↓ |
2 lines elided |
↑ open up ↑ |
267 305 .ne 2
268 306 .na
269 307 \fB\fB>0\fR\fR
270 308 .ad
271 309 .sp .6
272 310 .RS 4n
273 311 An error occurred.
274 312 .RE
275 313
276 314 .SH SEE ALSO
277 -.sp
278 315 .LP
279 316 \fBpsradm\fR(1M), \fBpsrinfo\fR(1M), \fBpsrset\fR(1M), \fBprocessor_bind\fR(2),
280 317 \fBprocessor_info\fR(2), \fBsysconf\fR(3C), \fBattributes\fR(5)
281 318 .SH DIAGNOSTICS
282 -.sp
283 319 .ne 2
284 320 .na
285 321 \fB\fBpbind: cannot query pid 31: No such process\fR\fR
286 322 .ad
287 323 .sp .6
288 324 .RS 4n
289 325 The process specified did not exist or has exited.
290 326 .RE
291 327
292 328 .sp
293 329 .ne 2
294 330 .na
295 331 \fB\fBpbind: cannot bind pid 31: Not owner\fR\fR
296 332 .ad
297 333 .sp .6
298 334 .RS 4n
299 335 The user does not have permission to bind the process.
300 336 .RE
301 337
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
302 338 .sp
303 339 .ne 2
304 340 .na
305 341 \fB\fBpbind: cannot bind pid 31: Invalid argument\fR\fR
306 342 .ad
307 343 .sp .6
308 344 .RS 4n
309 345 The specified processor is not on-line.
310 346 .RE
311 347
348 +.sp
349 +.ne 2
350 +.na
351 +\fBpbind: failed to exec\fR \fIcmd\fR
352 +.ad
353 +.sp .6
354 +.RS 4n
355 +Could not resolve the \fIcmd\fR from \fBPATH\fR.
356 +.RE
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX