attachrset Command

Purpose

Attaches an rset to a process.

Syntax

attachrset [ -P ]  [ -F ]  [ -S ]  rsetname pid
or
attachrset [ -P ]  [ -F ] [ -c CPUlist ] [ -m MEMlist ] pid

Description

The attachrset command attaches an rset to a process. The command limits the specified process to run only on the processors and/or memory regions contained in the rset. An rset name in the system registry can be attached to the process. Or, an rset containing the specified processors and memory regions can be attached to the process.

Flags

Item Description
-P Attaches an rset as a partition rset.
-F Forces the rset attachment to occur. This option will remove a bindprocessor bind and all threads' rset in the process before attaching the new rset. If the -P option is also specified, it will also detach the effective all threads' rset from the process before attaching the new rset.
-c CPUlist List of CPUs to be in the rset. 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.
-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 to be attached to the process. The name consists of a namespace and an rsname separated by a "/" (slash). Both the namespace and rsname may contain up to 255 characters. See the rs_registername() service for additional information about character set limits of rset names.
pid Process ID to connect rset.

Security

The user must have root authority or have CAP_NUMA_ATTACH capability and read access to the specified rset registry name (if -r option used) and target process must have the same effective userid as the command issuer. The user must have root authority to set the partition rset on a process (the -P option).

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 Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.

Examples

  1. To attach an rset containing CPUs 0-7 to process 18838, type:
    attachrset -c 0-7 18838
  2. To attach rset named test/cpus0to7 to process 20124, type:
    attachrset test/cpus0to7 20124

Files

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