Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Thursday, June 13, 2019
 
 

psrset(8)

Name

psrset - creation and management of psets

Synopsis

psrset -a [-F] pset_id processor_id...
psrset -b pset_id pid [/lwpid]...
psrset -c [-F] [processor_id]...
psrset -d pset_id...
psrset -e pset_id command [argument(s)]
psrset -f pset_id
psrset [-i] [pset_id]...
psrset -n pset_id
psrset -p [processor_id]...
psrset [-q] [pid [/lwpid]]...
psrset -Q [pset_id]...
psrset -r [-F] processor_id...
psrset -u pid [/lwpid]...
psrset -U [pset_id]...

Description

The psrset utility controls the management of psets. Psets allow the binding of processes or LWPs to groups of processors, rather than just a single processor. Processors assigned to psets can run only LWPs that have been bound to that pset.

This command cannot be used to modify or bind to psets created by the resource pools framework. These psets are referred to as "pool psets". This includes assigning processors that are already allocated or assigned to pool psets. Use pooladm(8), poolcfg(8), and poolbind(8) to modify and bind to pool psets.

Aside from the default processor set, only processes and/or LWPs from a single zone can be bound to each processor set at any given time.

Options

The following options are supported:

–a

Assign the specified processors to the specified processor set. With the additional –F option, all LWPs bound to the specified processors will be unbound prior to changing psets.

This option is restricted to users with the PRIV_SYS_RES_CONFIG privilege.

The target pset cannot be a pool pset. Also, any specified processors that are already allocated or assigned to a pool pset cannot be assigned to a pset by psrset(8). To manipulate processors assigned to pool psets, use the pool utilities. See poolcfg(8).

–b

Bind all or a subset of the LWPs of the specified processes to the specified pset.

LWPs bound to a pset are restricted to run only on the processors in that set. Processes can only be bound to non-empty psets, that is, psets that have had processors assigned to them.

Bindings are inherited, so new LWPs and processes created by a bound LWP have the same binding. Binding an interactive shell to a processor, for example, binds all commands executed by the shell.

This option is restricted to users with the PRIV_SYS_RES_CONFIG privilege.

Only psets created by psrset(8) are valid binding targets. Pool psets are not valid binding targets. See poolcfg(8) and poolbind(8).

Zones which are using dedicated-cpu, or are bound to a pool pset, may not have individual processes or threads bound to other psets, including the default pset, those created by psrset(8), and other pool psets. Binding processes or threads belonging to such a zone will fail.

–c

Create a new pset and displays the new processor set ID. With the additional –F option, all LWPs bound to the specified processors will be unbound prior to assigning them to the pset being created.

If a list of processors is given, it also attempts to assign those processors to the pset. If this succeeds, the processors are idle until LWPs are bound to the pset. This option is restricted to users with the PRIV_SYS_RES_CONFIG privilege.

Any specified processors that are already allocated or assigned to a pool pset cannot be assigned to a pset by psrset(8). To manipulate processors assigned to pool psets, use the pool utilities. See poolcfg(8).

Only a limited number of psets can be active (created and not destroyed) at a given time. This limit is always greater than the number of processors in the system. If the –c option is used when the maximum number of psets is already active, the command fails.

The following format is used for the first line of output of the –c option when the LC_MESSAGES locale category specifies the “C” locale. In other locales, the strings created, processor, and set can be replaced with more appropriate strings corresponding to the locale.


"created processor set %d\n" processor set ID
–d

Remove the specified pset, releasing all processors and processes associated with it.

This option is restricted to users with the PRIV_SYS_RES_CONFIG privilege.

Only psets created by psrset(8) are valid targets.

–e

Execute a command (with optional arguments) in the specified pset.

The command process and any child processes are executed only by processors in the pset.

This option is restricted to users with the PRIV_SYS_RES_CONFIG privilege.

Only psets created by psrset(8) are valid targets.

–f

Disables interrupts for all processors within the specified pset. See psradm(8).

If some processors in the set cannot have their interrupts disabled, the other processors still have their interrupts disabled, and the command reports an error and return non-zero exit status.

This option is restricted to users with the PRIV_SYS_RES_CONFIG privilege.

–F

Forces the specified pset operation by unbinding all threads bound to the specified processor. Only the –a, –c, or the –r option can be used in combination with this option. Administrators are encouraged to use the –Q option for pbind(8) to find out which threads will be affected by such operation.

–i

Display a list of processors assigned to each named pset. If no argument is given, a list of all psets and the processors assigned to them is displayed. This is also the default operation if the psrset command is not given an option.

–n

Enable interrupts for all processors within the specified pset. See psradm(8).

This option is restricted to users with the PRIV_SYS_RES_CONFIG privilege.

–p

Display the pset assignments for the specified list of processors. If no argument is given, the pset assignments for all processors in the system is given.

–q

Display the pset bindings of the specified processes or of all processes. If a process is composed of multiple LWPs which have different bindings and the LWPs are not explicitly specified, the bindings of only one of the bound LWPs is displayed. The bindings of a subset of LWPs can be displayed by appending “/lwpids” to the process IDs. Multiple LWPs may be selected using “-” and “,” delimiters. See EXAMPLES.

–Q

Display the LWPs bound to the specified list of processor sets, or all LWPs with pset bindings.

–r

Remove a list of processors from their current processor sets. Processors that are removed return to the general pool of processors, also known as the default pset in the resource pools framework.

Processors with LWPs bound to them using pbind(8) can be assigned to or removed from psets using the –F option.

This option is restricted to users with the PRIV_SYS_RES_CONFIG privilege.

The target pset cannot be in a pool pset. To manipulate processors assigned to pool psets, use the pool utilities. See poolcfg(8).

–u

Remove the pset bindings of a subset or all the LWPs of the specified processes, allowing them to be executed on any on-line processor if they are not bound to individual processors through pbind.

Users with the PRIV_SYS_RES_CONFIG privilege can unbind any process or LWP from any active pset. Other users can unbind processes and LWPs from psets that do not have the PSET_NOESCAPE attribute set. In addition, the user must have permission to control the affected processes; the real or effective user ID of the user must match the real or saved user ID of the target processes.

Zones which are using dedicated-cpu, or are bound to a pool pset, may not have individual processes or threads unbound. Unbinding processes or threads belonging to such a zone will fail.

–U

Removes the bindings of all LWPs bound to the specified list of psets, or to any pset if no argument is specified.

Only psets created by psrset(8) are valid unbind targets. Pool psets are not valid unbind targets. Use poolbind(8) to bind processes bound to regular pools to the default pool.

Operands

The following operands are supported:

pid

Specify pid as a process ID.

lwpid

The set of LWPIDs of the specified process to be controlled or queried. The syntax for selecting LWP IDs is as follows:

2,3,4-8       LWP IDs 2, 3, and 4 through 8
-4            LWPs whose IDs are 4 or below
4-            LWPs whose IDs are 4 or above
processor_id

Specify processor_id as an individual processor number (for example, 3), multiple processor numbers separated by spaces (for example, 1 2 3), or a range of processor numbers (for example, 1-4). It is also possible to combine ranges and (individual or multiple) processor_ids (for example, 1‐3 5 7‐8 9).

pset_id

Specify pset_id as a processor set ID.

Exit Status

The following exit values are returned:

0

Successful completion.

non-0

An error occurred.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Availability
system/core-os
Interface Stability
Committed

See Also

processor_bind(2), processor_info(2), pset_bind(2), pset_create(2), pset_info(2), sysconf(3C), libpool(3LIB), attributes(7), privileges(7), resource-management(7), pbind(8), pooladm(8), poolbind(8), poolcfg(8), psradm(8), psrinfo(8)

Diagnostics

The following output indicates that the specified process did not exist or has exited:


psrset: cannot query pid 31: No such process

The following output indicates that the user does not have permission to bind the process:


psrset: cannot bind pid 31: Not owner

The following output indicates that the user does not have permission to assign the processor:


psrset: cannot assign processor 4: Not owner

The following output indicates that the specified processor is not on-line, or the specified processor does not exist.


psrset: cannot assign processor 8: Invalid argument

The following output indicates that an LWP in the specified process is bound to a processor and cannot be bound to a pset that does not include that processor:


psrset: cannot bind pid 67: Device busy

The following output indicates that the specified processor could not be added to the pset. This can be due to bound LWPs on that processor, or because that processor cannot be combined in the same pset with other processors in that set, or because the processor is the last one in its current pset:


psrset: cannot assign processor 7: Device busy

The following output indicates that the specified pset does not exist:


psrset: cannot execute in processor set 8: Invalid argument

The following output indicates that the maximum number of psets allowed in the system is already active:


psrset: cannot create processor set: Not enough space

The following output indicates that the target pset was created by the resource pools facility:


psrset: cannot assign processor 7: Operation not supported
psrset: cannot bind pid 31: Operation not supported
psrset: cannot bind pid 31: Operation not supported 
psrset: could not remove processor set 1: Operation not supported
psrset: cannot exec in processor set 1: Operation not supported
psrset: cannot remove processor 7: Operation not supported
psrset: cannot unbind pid 31: Operation not supported