Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > P

psrset(1M)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

psrset — create and manage processor sets

SYNOPSIS

psrset [-f] -a pset_id processor_list

psrset [-f] -b pset_id pid_list

psrset [-f] -c [processor_list]

psrset [-f] -d pset_list

psrset [-f] -d all

psrset [-f] -e pset_id command [argument_list]

psrset [-f] -g pset_id pgid

psrset [-i] [pset_list]

psrset [-f] -n pset_id

psrset -p [processor_list]

psrset -q [pid_list]

psrset [-f] -r processor_list

psrset [-f] -t pset_id attribute_name=attribute_value

psrset [-f] -u pid_list

psrset [-f] -F pset_id

psrset [-f] -U pset_id uid

Real Time Extensions Commands

psrset [-f] -l

psrset [-f] -m pset_id

psrset [-f] -s pset_id

psrset [-f] -R [processor_list]

DESCRIPTION

The psrset utility controls the management of processor sets. Processor sets allow a subset of processors in the system to be isolated for exclusive use by specified threads and processes. Processes may now be bound to groups of processors rather than just one. Each processor set represents a separate scheduling allocation domain. Schedulers in each processor set work independently; there is no load balancing performed across processor set boundary by the system.

The default processor set (0) always exists and may not be destroyed. All processes and processors at system init time start out in the system default processor set. For this reason processor 0 may never be removed from the default group. (Hence this feature is of no value on a single processor system.)

A processor belongs to exactly one processor set at a time, and it can be reassigned from one processor set to another processor set dynamically with appropriate privileges. There can exist processor sets with no processors. This may be temporary due to resource needs elsewhere in the system. (See pset_assign(2) for details).

A process or a thread is bound to exactly one processor at a time, and their binding can be changed from one processor set to another with appropriate privileges. All threads of a process need not belong to the same processor set. (See pset_bind(2) for details).

A processor set has access permissions, and only the users with appropriate permissions may perform operations on processor sets. A superuser or a PRIV_PSET privilege user may perform any operation on processor sets. (See pset_create(2) and pset_setattr(2) for details).

Options

If no options are specified for the psrset command, then the -i option is assumed (see below).

The following options are supported:

-a pset_id processor_list

Assigns processor_list to pset_id. processor_list is the list of processors, and pset_id is the processor set identification number. The processors are taken out of their current processor set and are reassigned to the specified processor set. Processor 0 may not be reassigned.

If the processor being reassigned is the last processor in its current processor set, the behavior is defined by the LASTSPU attribute. See the -t option to define LASTSPU. The possible attribute values for LASTSPU are as follows:

DFLTPSET

Default behavior. Reassign the processor to the specified processor set, and return the active processes/threads in the processor set to the default set.

FAIL

Fail the request.

-b pset_id pid_list

Binds pid_list to pset_id. pid_list is the specified list of processes (including all their threads), and pset_id is the specified processor set. Bindings are inherited, so newly created threads and processes will inherit their processor set binding from their parents.

If the target processor (pset_id) has no processors assigned, the behavior is defined by the EMPTY attribute. See the -t option to define EMPTY. The possible attribute values for EMPTY are as follows:

FAIL

Default behavior. Fail the request.

-c [processor_list]

Creates a new processor set and displays the processor set identification number (pset_id) for the new processor set. If a list of processors (processor_list) are specified on the command line, they are assigned to the newly created processor set.

-d pset_list

-d all

Destroys the specified list of processor sets (pset_list). When the all option is specified, all the processor sets in the system are destroyed. When the processor set has processors assigned, or there are active processes/threads bound to the processor set, the behavior is defined by the value of the NONEMPTY attribute. See the -t option to define NONEMPTY. The possible attribute values for NONEMPTY are as follows:

DFLTPSET

Default behavior. Return all processors and threads/processes in the processor set to the default set.

FAIL

Fail the request if processor set has any processor assigned, or has active processes or threads.

FAILBUSY

Fail the request if there are active processes or threads bound to the processor set.

-e pset_id command [ argument_list ]

Executes the specified command in the specified processor set (pset_id). The effect is the same as binding your shell to the target processor set, executing the command, and changing back to your original processor set. The command may have arguments listed in argument_list.

-f

Forces the operation if the HP Process Resource Manager (HP PRM) is installed and configured. The processor sets can also be configured by PRM. HP Process Resource Manager is documented in the HP Process Resource Manager User's Guide.

This option is applicable to all the configuration options to override the PRM. If the force flag is not used with configuration options in the presence of PRM, then psrset exits with an error message.

IMPORTANT: If used, the -f option must be specified before any other arguments are specified to the psrset command.

-g pset_id pgid

Binds all the processes (including all their threads) belonging to the process group (pgid) to the specified processor set (pset_id). This option is like explicitly listing all these processes with the -b option.

-i [pset_list]

Displays the processor assignments and attribute values for all processor sets specified in the list (pset_list) or for all sets by default. It will also list the Locality Domains that belong to the processor sets. If pset_list is not specified, then information for all processor sets are displayed. If no options are specified for the psrset command, then the -i option is assumed.

-n pset_id

Enables external I/O interrupts for all processors assigned to the specified processor set (pset_id).

-p [processor_list]

Displays the processor set assignment for all processors specified in the list (processor_list) or for all processors by default.

-q [pid_list]

Displays the processor set binding for all processes specified in the list (pid_list) or for all processes by default.

-r processor_list

Removes the specified list of processors (processor_list) from their current processor set, and reassigns them back to the default set. This option is identical to -a 0 processor_list.

-t pset_id attribute_name=attribute_value

Changes the attribute value of the specified attribute on the specified processor set (pset_id). Some values may not be be supported. The following attributes are supported:

OWNID

Change owner of the specified processor set.

GRPID

Change group id of the specified processor set.

PERM

Change access permissions of the specified processor set.

NONEMPTY

Define behavior on processor destroy request. See the -d option.

EMPTY

Define behavior on request to bind a process or thread to an empty processor set. See the -b option.

LASTSPU

Define behavior on request to remove the last processor from a processor set. See -a option.

LCPU

Define the logical processor (LCPU) attribute in the target processor set. On a multi-threaded processor core, each hardware thread is represented as an LCPU. If LCPU is disabled, the processor cores in the target processor set behave as a single threaded core. However, when LCPU is enabled, the processor cores in the target pset have hardware multi-threading enabled.

-u pid_list

Unbinds pid_list, the specified list of processes (including all their threads), from their current processor set returning them to the default set. The -u option is identical to -b 0 pid_list.

-F pset_id

Disables external I/O interrupts for all processors assigned to the specified processor set (pset_id).

-U pset_id uid

Binds all the processes (including all their threads) owned by the user id (uid) to the specified processor set (pset_id). This option is like explicitly listing all these processes with -b option.

Real Time Extensions Options

The following options are related to Real Time Extensions (RTE) for processor sets:

-l

Lists all the processor sets that are configured as RTE processor set.

-m pset_id

Marks a processor set with the identification number, pset_id, as an RTE processor set. The processors that are part of the pset_id processor set become RTSPU's. The default processor set which contains processor 0 may not be configured as an RTE processor set. The processor set may or may not have processors assigned at this point. If pset has processors assigned to it at time of request, these processors are made unavailable to the kernel daemons. External I/O interrupts and pending callouts on processors in pset are reassigned to processors in non-RTE processor sets in the system. The processor set attribute values are changed to default values for an RTE processor set.

The various failure conditions could be:

  • The configuring application does not have root privileges.

  • RTE is not enabled.

  • The pset_id is invalid.

-s pset_id

Un-marks the processor set with the identification number, pset_id, as an RTE processor set. The processor set is not destroyed.

-R [processor_list]

Creates a new RTE processor set and displays the processor set identification number (pset_id) for the new processor set. If a list of processors (processor_list) are specified on the command line, they are assigned to the newly created processor set.

EXTERNAL INFLUENCES

Environment Variables

LANG provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the default value of C is used (see lang(5)). If any of the internationalization variables contains an invalid setting, psrset will behave as if all internationalization variables are set to C. See environ(5).

LC_ALL determines the locale that overrides any values for locale categories specified by the settings of LANG or any environment variables beginning with LC_.

LC_MESSAGES determines the locale that affects the format and contents of diagnostic messages written to standard error and the informative messages written to standard output.

International Code Set Support

Single-byte and multi-byte character code sets are supported.

EXAMPLES

psrset Example

Read and display the system processor set configurations for all processor sets. If no options are specified for the psrset command, then the -i option is assumed.

  • psrset

    psrset -i

psrset -a Example

Reassign processors 4 and 1 from their current processor sets to processor set 5:

psrset -a 5 4 1

psrset -b Example

Change the binding of a running process (pid=1000) to processor set 6:

psrset -b 6 1000

psrset -c Example

Create a new processor set and assign processors 1, 2 and 4 to the new set:

psrset -c 1 2 4

psrset -e Example

Execute the command cat foo in processor set 4:

psrset -e 4 cat foo

psrset -t Examples

Change behavior for processor set destroy operation to fail the request if there are active processes bound to the processor set:

psrset -t NONEMPTY=FAILBUSY

Change the ownership of processor set 3 to user id 100:

psrset -t 3 OWNID=100

For processor set 2, change access permissions to 666:

psrset -f -t 2 PERM=666

RETURN VALUE

psrset returns zero on successful completion. Otherwise, a non-zero value is returned and the message is displayed to indicate the error.

AUTHOR

psrset was developed by HP.

SEE ALSO

pset_assign(2), pset_bind(2), pset_create(2), pset_ctl(2), pset_destroy(2), pset_getattr(2), pset_setattr(2).

HP Process Resource Manager is documented in the HP Process Resource Manager User's Guide.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.