execrset Command

Purpose

Runs a program or command attached to an rset.

Syntax

execrset [ -P ] [ -F ] -c CPUlist [ -m MEMlist ] -e command [ parameters ]

or

execrset [ -P ] [ -F ] [ -S ] rsetname [ -e ] command [ parameters ]

Description

The execrset command executes a command with an attachment to an rset. It causes the specified command to be limited to running only on the processors and/or memory regions contained in the rset. An rset name in the system registry can be used to specify the processors and/or memory regions the command is allowed to use. Or, an rset containing the specified processors and memory regions can be attached to the process.

Flags

Item Description
-F Force the execrset command to occur. This flag removes a bindprocessor bind and all threads' rset in the process before issuing the command. If the -P flag is also specified, it detaches the effective rset and all threads' rset from the process before issuing the command.
-P Attaches an rset as a partition rset.
-c CPUlist List of CPUs to be in the rset to be attached to the process which executes the program or command. This can be one or more CPUs or CPU ranges.
-m MEMlist List of memory regions to be in the rset. This can be one or more memory regions or ranges.
-e command [ parameters ] Specifies the command to run followed by any parameters. The -e flag must be the last flag used in the command.
-S A hint that indicates that the process must be scheduled to run in single-threaded mode. Only one of the hardware threads of each physical processor that is included in the specified rset will be used to schedule the job. If all the hardware threads of a physical processor are not included in the specified rset, that processor will be ignored. The specified rset must be an exclusive rset or the command fails. Specifying this flag allows jobs to run with single-thread behavior.

Parameters

Item Description
rsetname The name of the rset in the system registry to be attached to the process executing the program or command

Security

The user must have root authority or have CAP_NUMA_ATTACH capability. The user must have root authority to attach a partition rset to the command's process (the -P flag).

Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in AIX® Version 7.1 Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To run the test1 program on CPUs 0-7, type:
    execrset -c 0-7 -e test1
  2. To run the 'test2 parm1 parm2' program with an attachment to rset named test/cpus0to15, type:
    execrset test/cpus0to15 test parm1 parm2
  3. To run the ls -l command on CPU 0, type:
    execrset -c 0 -e ls -l

Files

Item Description
/usr/bin/execrset Contains the execrset command.