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

NAME

6       psrset - creation and management of processor sets
7

SYNOPSIS

9       psrset -a [-F] processor_set_id processor_id...
10
11
12       psrset -b processor_set_id pid [/lwpid]...
13
14
15       psrset -c [-F] [processor_id]...
16
17
18       psrset -d processor_set_id...
19
20
21       psrset -e processor_set_id command [argument(s)]
22
23
24       psrset -f processor_set_id
25
26
27       psrset [-i] [processor_set_id]...
28
29
30       psrset -n processor_set_id
31
32
33       psrset -p [processor_id]...
34
35
36       psrset [-q] [pid [/lwpid]]...
37
38
39       psrset -Q [processor_set_id]...
40
41
42       psrset -r [-F] processor_id...
43
44
45       psrset -u pid [/lwpid]...
46
47
48       psrset -U [processor_set_id]...
49
50

DESCRIPTION

52       The psrset utility controls the management of processor sets. Processor
53       sets allow the binding of processes or LWPs to  groups  of  processors,
54       rather  than  just a single processor. Processors assigned to processor
55       sets can run only LWPs that have been bound to that processor set.
56
57
58       This command cannot be used to modify processor disposition when  pools
59       are  enabled.  Use  pooladm(1M) and poolcfg(1M) to modify processor set
60       configuration through the resource pools facility.
61

OPTIONS

63       The following options are supported:
64
65       -a    Assign the specified processors to the specified  processor  set.
66             With  the  additional  -F option, all LWPs bound to the specified
67             processors will be unbound prior to changing processor sets.
68
69             This option is restricted to users with  the  PRIV_SYS_RES_CONFIG
70             privilege.
71
72
73       -b    Bind  all  or  a subset of the LWPs of the specified processes to
74             the specified processor set.
75
76             LWPs bound to a processor set are restricted to run only  on  the
77             processors  in that set. Processes can only be bound to non-empty
78             processor sets, that is, processor sets that have had  processors
79             assigned to them.
80
81             Bindings  are  inherited,  so new LWPs and processes created by a
82             bound LWP have the same binding. Binding an interactive shell  to
83             a  processor,  for  example,  binds  all commands executed by the
84             shell.
85
86             This option is restricted to users with  the  PRIV_SYS_RES_CONFIG
87             privilege.
88
89
90       -c    Create a new processor set and displays the new processor set ID.
91             With the additional -F option, all LWPs bound  to  the  specified
92             processors will be unbound prior to assigning them to the proces‐
93             sor set being created.
94
95             If a list of processors is given,  it  also  attempts  to  assign
96             those processors to the processor set. If this succeeds, the pro‐
97             cessors are idle until LWPs are bound to the processor set.  This
98             option is restricted to users with the PRIV_SYS_RES_CONFIG privi‐
99             lege.
100
101             Only a limited number of processor sets can  be  active  (created
102             and  not  destroyed)  at  a  given  time. This limit is always be
103             greater than the number of processors in the system.  If  the  -c
104             option  is  used  when  the  maximum  number of processor sets is
105             already active, the command fails.
106
107             The following format is used for the first line of output of  the
108             -c  option when the LC_MESSAGES locale category specifies the "C"
109             locale. In other locales, the strings created, processor, and set
110             can  be  replaced  with more appropriate strings corresponding to
111             the locale.
112
113               "created processor set %d\n" processor set ID
114
115
116
117
118       -d    Remove the specified processor set, releasing all processors  and
119             processes associated with it.
120
121             This  option  is restricted to users with the PRIV_SYS_RES_CONFIG
122             privilege.
123
124
125       -e    Execute a command (with optional arguments) in the specified pro‐
126             cessor set.
127
128             The  command process and any child processes are executed only by
129             processors in the processor set.
130
131             This option is restricted to users with  the  PRIV_SYS_RES_CONFIG
132             privilege.
133
134
135       -f    Disables  interrupts for all processors within the specified pro‐
136             cessor set. See psradm(1M).
137
138             If some processors in the set cannot have their  interrupts  dis‐
139             abled, the other processors still have their interrupts disabled,
140             and the command reports an error and return non-zero exit status.
141
142             This option is restricted to users with  the  PRIV_SYS_RES_CONFIG
143             privilege.
144
145
146       -F    Forces  the  specified  processor  set operation by unbinding all
147             threads bound to the specified processor. Only the -a or  the  -r
148             option  can  be used in combination with this option. Administra‐
149             tors are encouraged to use the -Q option for  pbind(1M)  to  find
150             out which threads will be affected by such operation.
151
152
153       -i    Display  a  list  of  processors assigned to each named processor
154             set. If no argument is given, a list of all  processor  sets  and
155             the  processors  assigned  to them is displayed. This is also the
156             default operation if the psrset command is not given an option.
157
158
159       -n    Enable interrupts for all processors within the specified proces‐
160             sor set. See psradm(1M).
161
162             This  option  is restricted to users with the PRIV_SYS_RES_CONFIG
163             privilege.
164
165
166       -p    Display the processor set assignments for the specified  list  of
167             processors.  If  no  argument is given, the processor set assign‐
168             ments for all processors in the system is given.
169
170
171       -q    Display the processor set bindings of the specified processes  or
172             of all processes. If a process is composed of multiple LWPs which
173             have different bindings and the LWPs are  not  explicitly  speci‐
174             fied,  the  bindings  of only one of the bound LWPs is displayed.
175             The bindings of a subset of LWPs can be  displayed  by  appending
176             "/lwpids" to the process IDs. Multiple LWPs may be selected using
177             "-" and "," delimiters. See EXAMPLES.
178
179
180       -Q    Display the LWPs bound to the specified list of  processor  sets,
181             or all LWPs with processor set bindings.
182
183
184       -r    Remove  a  list  of processors from their current processor sets.
185             Processors that are removed return to the general pool of proces‐
186             sors.
187
188             Processors  with  LWPs  bound  to  them  using  pbind(1M)  can be
189             assigned to or removed from processor sets using the -F option.
190
191             This option is restricted to users with  the  PRIV_SYS_RES_CONFIG
192             privilege.
193
194
195       -u    Remove  the processor set bindings of a subset or all the LWPs of
196             the specified processes, allowing them to be executed on any  on-
197             line  processor  if  they  are not bound to individual processors
198             through pbind.
199
200             Users with  the  PRIV_SYS_RES_CONFIG  privilege  can  unbind  any
201             process  or  LWP  from  any active processor set. Other users can
202             unbind processes and LWPs from processor sets that  do  not  have
203             the  PSET_NOESCAPE attribute set. In addition, the user must have
204             permission to control the affected processes; the real or  effec‐
205             tive  user ID of the user must match the real or saved user ID of
206             the target processes.
207
208
209       -U    Removes the bindings of all LWPs bound to the specified  list  of
210             processor  sets, or to any processor set if no argument is speci‐
211             fied.
212
213

OPERANDS

215       The following operands are supported:
216
217       pid                 Specify pid as a process ID.
218
219
220       lwpid               The set of LWPIDs of the specified  process  to  be
221                           controlled or queried. The syntax for selecting LWP
222                           IDs is as follows:
223
224                             2,3,4-8       LWP IDs 2, 3, and 4 through 8
225                             -4            LWPs whose IDs are 4 or below
226                             4-            LWPs whose IDs are 4 or above
227
228
229
230       processor_id        Specify processor_id  as  an  individual  processor
231                           number (for example, 3), multiple processor numbers
232                           separated by spaces (for example,  1  2  3),  or  a
233                           range  of  processor numbers (for example, 1-4). It
234                           is also possible to combine ranges and  (individual
235                           or  multiple) processor_ids (for example, 1-3 5 7-8
236                           9).
237
238
239       processor_set_id    Specify processor_set_id as a processor set ID.
240
241

EXIT STATUS

243       The following exit values are returned:
244
245       0        Successful completion.
246
247
248       non-0    An error occurred.
249
250

ATTRIBUTES

252       See attributes(5) for descriptions of the following attributes:
253
254
255
256
257       ┌─────────────────────────────┬─────────────────────────────┐
258       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
259       ├─────────────────────────────┼─────────────────────────────┤
260       │Availability                 │SUNWcsu                      │
261       ├─────────────────────────────┼─────────────────────────────┤
262       │Stability Level              │Stable                       │
263       └─────────────────────────────┴─────────────────────────────┘
264

SEE ALSO

266       pbind(1M), pooladm(1M), poolcfg(1M), psradm(1M),  psrinfo(1M),  proces‐
267       sor_bind(2),     processor_info(2),    pset_bind(2),    pset_create(2),
268       pset_info(2), sysconf(3C), libpool(3LIB), attributes(5), privileges(5)
269

DIAGNOSTICS

271       The following output indicates that the specified process did not exist
272       or has exited:
273
274         psrset: cannot query pid 31: No such process
275
276
277
278
279       The  following  output indicates that the user does not have permission
280       to bind the process:
281
282         psrset: cannot bind pid 31: Not owner
283
284
285
286
287       The following output indicates that the user does not  have  permission
288       to assign the processor:
289
290         psrset: cannot assign processor 4: Not owner
291
292
293
294
295       The  following output indicates that the specified processor is not on-
296       line, or the specified processor does not exist.
297
298         psrset: cannot assign processor 8: Invalid argument
299
300
301
302
303       The following output indicates that an LWP in the specified process  is
304       bound  to  a processor and cannot be bound to a processor set that does
305       not include that processor:
306
307         psrset: cannot bind pid 67: Device busy
308
309
310
311
312       The following output indicates that the specified processor  could  not
313       be  added  to  the processor set. This can be due to bound LWPs on that
314       processor, or because that processor cannot be  combined  in  the  same
315       processor set with other processors in that set, or because the proces‐
316       sor is the last one in its current processor set:
317
318         psrset: cannot assign processor 7: Device busy
319
320
321
322
323       The following output indicates that the specified  processor  set  does
324       not exist:
325
326         psrset: cannot execute in processor set 8: Invalid argument
327
328
329
330
331       The  following  output  indicates  that the maximum number of processor
332       sets allowed in the system is already active:
333
334         psrset: cannot create processor set: Not enough space
335
336
337
338
339       The following output indicates that the pools facility is active.
340
341         psrset: cannot assign processor 7: Operation not supported
342         psrset: cannot bind pid 31: Operation not supported
343         psrset: cannot bind pid 31: Operation not supported
344         psrset: could not create processor set: Operation not supported
345         psrset: could not remove processor set 1: Operation not supported
346         psrset: cannot exec in processor set 1: Operation not supported
347         psrset: cannot remove processor 7: Operation not supported
348         psrset: cannot unbind pid 31: Operation not supported
349
350
351
352
353
354SunOS 5.11                        25 Feb 2008                       psrset(1M)
Impressum