1pbind(1M)               System Administration Commands               pbind(1M)
2
3
4

NAME

6       pbind - control and query bindings of processes or LWPs
7

SYNOPSIS

9       pbind -b processor_id pid [/lwpid]...
10
11
12       pbind [-q] [pid [/lwpid]]...
13
14
15       pbind -Q [processor_id]...
16
17
18       pbind -u pid [/lwpid]...
19
20
21       pbind -U [processor_id]...
22
23

DESCRIPTION

25       pbind  controls and queries bindings of processes and LWPs (lightweight
26       processes) to processors. pbind can also remove processor bindings that
27       were previously established.
28
29
30       When  an  LWP is bound to a processor, it will be executed only by that
31       processor except when the LWP requires a resource that is provided only
32       by  another  processor. The binding is not exclusive, that is, the pro‐
33       cessor is free to execute other LWPs as well.
34
35
36       Bindings are inherited, so new LWPs and processes created  by  a  bound
37       LWP  will have the same binding. Binding an interactive shell to a pro‐
38       cessor, for example, binds all commands executed by the shell.
39
40
41       Superusers may bind or unbind any process or LWP, while other users can
42       bind  or  unbind  any  process or LWP for which they have permission to
43       signal, that is, any process that has the same effective user ID as the
44       user.
45

OPTIONS

47       The following options are supported:
48
49       -b processor_id
50
51           Binds all or a subset of the LWPs of the specified processes to the
52           processor processor_id. Specify processor_id as the processor ID of
53           the  processor  to  be  controlled or queried. processor_id must be
54           present and on-line. Use the psrinfo command to  determine  whether
55           or not processor_id is present and on-line. See psrinfo(1M).
56
57
58       -q
59
60           Displays  the  bindings  of  the specified processes or of all pro‐
61           cesses. If a process is composed of multiple LWPs which  have  dif‐
62           ferent  bindings  and  the  LWPs  are not explicitly specified, the
63           bindings of only one of the bound LWPs will be displayed. The bind‐
64           ings of a subset of LWPs can be displayed by appending "/lwpids" to
65           the process IDs. Multiple LWPs may be selected using  "-"  and  ","
66           delimiters. See EXAMPLES.
67
68
69       -Q
70
71           Displays the LWPs bound to the specified list of processors, or all
72           LWPs with processor bindings. For processes  composed  of  multiple
73           LWPs, the bindings of individual LWPs will be displayed.
74
75
76       -u
77
78           Removes  the  bindings of all or a subset of the LWPs of the speci‐
79           fied processes, allowing them to be executed on any on-line proces‐
80           sor.
81
82
83       -U
84
85           Removes  the  bindings  of  all LWPs bound to the specified list of
86           processors, or to any processor if no argument is specified.
87
88

OPERANDS

90       The following operands are supported:
91
92       pid
93
94           The process ID of the process to be controlled or queried.
95
96
97       lwpid
98
99           The set of LWP IDs of the specified process  to  be  controlled  or
100           queried. The syntax for selecting LWP IDs is as follows:
101
102             2,3,4-8       LWP IDs 2, 3, and 4 through 8
103             -4            LWPs whose IDs are 4 or below
104             4-            LWPs whose IDs are 4 or above
105
106
107
108       processor_id
109
110           The processor ID of the processor to be controlled or queried.
111
112

EXAMPLES

114       Example 1 Binding Processes
115
116
117       The following example binds processes 204 and 223 to processor 2:
118
119
120         example% pbind -b 2 204 223
121         process id 204: was 2, now 2
122         process id 223: was 3, now 2
123
124
125
126       Example 2 Unbinding a Process
127
128
129       The following example unbinds process 204:
130
131
132         example% pbind -u 204
133
134
135
136       Example 3 Querying Bindings
137
138
139       The  following example queries bindings. It demonstrates that process 1
140       is bound to processor 0, process 149 has at  least  one  LWP  bound  to
141       CPU3, and process 101 has no bound LWPs.
142
143
144         example% pbind -q 1 149 101
145         process id 1: 0
146         process id 149: 3
147         process id 101: not bound
148
149
150
151       Example 4 Querying LWP Bindings
152
153
154       The  following  example  queries bindings of LWPs. It demonstrates that
155       LWP 1 of process 149 is bound to CPU3, and LWP 2 of process 149 is  not
156       bound.
157
158
159         example% pbind -q 149/1-2
160         lwp id 149/1: 3
161         lwp id 149/2: not bound
162
163
164
165       Example 5 Querying LWP Bindings for Processor 2:
166
167
168       The following example queries all LWPs bound to processor 2:
169
170
171         example% pbind -Q 2
172         lwp id 149/4: 2
173         lwp id 149/5: 2
174
175
176

ATTRIBUTES

178       See attributes(5) for descriptions of the following attributes:
179
180
181
182
183       ┌─────────────────────────────┬─────────────────────────────┐
184       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
185       ├─────────────────────────────┼─────────────────────────────┤
186       │Availability                 │SUNWcsu                      │
187       └─────────────────────────────┴─────────────────────────────┘
188

EXIT STATUS

190       The following exit values are returned:
191
192       0
193
194           Successful completion.
195
196
197       >0
198
199           An error occurred.
200
201

SEE ALSO

203       psradm(1M),   psrinfo(1M),   psrset(1M),   processor_bind(2),   proces‐
204       sor_info(2), sysconf(3C), attributes(5)
205

DIAGNOSTICS

207       pbind: cannot query pid 31: No such process
208
209           The process specified did not exist or has exited.
210
211
212       pbind: cannot bind pid 31: Not owner
213
214           The user does not have permission to bind the process.
215
216
217       pbind: cannot bind pid 31: Invalid argument
218
219           The specified processor is not on-line.
220
221
222
223
224SunOS 5.11                        25 Feb 2008                        pbind(1M)
Impressum