Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
System Administration Commandspsrset(1M)


NAME

 psrset - creation and management of processor sets

SYNOPSIS

 psrset -a processor_set_id processor_id ...
 psrset -b processor_set_id pid ...
 psrset -c [processor_id ...]
 psrset -d processor_set_id
 psrset -e processor_set_id command [argument(s)]
 psrset -f processor_set_id
 psrset [-i] [processor_set_id ...]
 psrset -n processor_set_id
 psrset -p [processor_id ...]
 psrset -q [pid ...]
 psrset -r processor_id ...
 psrset -u pid ...

DESCRIPTION

 

The psrset utility controls the management of processor sets. Processor sets allow the binding of processes to groups of processors, rather than just a single processor. There are two types of processor sets, those created by the user using the psrset command or the pset_create(2) system call, and those automatically created by the system. Processors assigned to user-created processor sets will run only LWPs that have been bound to that processor set, but system processor sets may run other LWPs as well.

System-created processor sets will not always exist on a given machine. When they exist, they will generally represent particular characteristics of the underlying machine, such as groups of processors that can communicate more quickly with each other than with other processors in the system. These processor sets cannot be modified or removed, but processes may be bound to them.

OPTIONS

 

The following options are supported:

-a
Assigns the specified processors to the specified processor set.

Processor sets automatically created by the system cannot have processors assigned to them. However, processors belonging to system processor sets may be assigned to user-created processor sets. This option is restricted to use by the super-user.

-b
Binds all the LWPs of the specified processes to the specified processor set.

LWPs bound to a processor set will be restricted to run only on the processors in that set unless they require resources available only on another processor. Processes may only be bound to non-empty processor sets, that is, processor sets that have had processors assigned to them.

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

-c
Creates a new processor set and displays the new processor set ID.

If a list of processors is given, it also attempts to assign those processors to the processor set. If this succeeds, the processors will be idle until LWPs are bound to the processor set. This option is restricted to use by the super-user.

Only a limited number of processor sets may be active (created and not destroyed) at a given time. This limit will always be greater than the number of processors in the system. If the -c option is used when the maximum number of processor sets is already active, the command will fail.

The following format will be 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 may be replaced with more appropriate strings corresponding to the locale.

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

-d
Removes the specified processor set, releasing all processors and processes associated with it.

Processor sets automatically created by the system cannot be removed. This option is restricted to use by the super-user.

-e
Executes a command (with optional arguments) in the specified processor set.

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

The super-user may execute a command in any active processor set. Other users may only execute commands in system processor sets.

-f
Disables interrupts for all processors within the specified processor set.

See psradm(1M). If some processors in the set cannot have their interrupts disabled, the other processors will still have their interrupts disabled, and the command will report an error and return non-zero exit status. This option is restricted to use by the super-user.

-i
Displays a list of processors assigned to each named processor set. If no argument is given, a list of all processor sets and the processors assigned to them is displayed. This is also the default operation if the psrset command is not given an option.
-n
Enables interrupts for all processors within the specified processor set.

See psradm(1M). This option is restricted to use by the super-user.

-p
Displays the processor set assignments for the specified list of processors. If no argument is given, the processor set assignments for all processors in the system is given.
-q
Displays the processor set bindings of the specified processes. If a process is composed of multiple LWPs, which have different bindings, the bindings of only one of the bound LWPs will be shown. If no argument is given, the processor set bindings of all processes in the system is displayed.
-r
Removes a list of processors from their current processor sets. Processors that are removed will return to either the system processor set to which they previously belonged, or to the general pool of processors if they did not belong to a system processor set. This option is restricted to use by the super-user.

Processors with LWPs bound to them using pbind(1M) cannot be assigned to or removed from processor sets.

-u
Removes the processor set bindings from 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.

The super-user can bind or unbind any process to any active processor set. Other users can only bind or unbind processes to system processor sets, and unbind only from processor sets that do not have the PSET_NOESCAPE attribute set. Furthermore, they can only bind or unbind processes for which they have permission to signal, that is, any process that has the same effective user ID as the user.

OPERANDS

 

The following operands are supported:

pid
Specify pid as a process ID.
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).
processor_set_id
Specify processor_set_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(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWcsu
Stability LevelStable

SEE ALSO

 

pbind(1M), psradm(1M), psrinfo(1M), processor_bind(2), processor_info(2), pset_bind(2), pset_create(2), pset_info(2), sysconf(3C), attributes(5)

DIAGNOSTICS

 
psrset: cannot query pid 31: No such process
The process specified did not exist or has exited.
psrset: cannot bind pid 31: Not owner
The user does not have permission to bind the process.
psrset: cannot assign processor 4: Not owner
The user does not have permission to assign the processor.
psrset: cannot assign processor 8: Invalid argument
The specified processor is not on-line, or the specified processor does not exist.
psrset: cannot bind pid 67: Device busy
An LWP in the specified process is bound to a processor and cannot be bound to a processor set that does not include that processor.
psrset: cannot assign processor 7: Device busy
The specified processor could not be added to the processor set. This may be due to bound LWPs on that processor, or because that processor cannot be combined in the same processor set with other processors in that set, or because the processor is the last one in its current processor set.
psrset: cannot execute in processor set 8: Invalid argument
The specified processor set does not exist.
psrset: cannot create processor set: Not enough space
The maximum number of processor sets allowed in the system is already active.

SunOS 5.9Go To TopLast Changed 16 Aug 2001

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.