wlmassign command

Purpose

Manually assigns processes to a workload management class or cancels prior manual assignments for processes.

Syntax

wlmassign [ -s | -S ] [ -u | Class_Name ] [ pid_list ] [ -g pgid_list ]

wlmassign [ -t { tag [ -i inheritance ] | -r } [ pid_list ] [ -g pgid_list ]

Description

The wlmassign command:

  • Assigns a set of processes specified by a list of process identifiers (PID) or process group identifiers (PGIDs) to a specified superclass or subclass or both, thus overriding the automatic class assignment or a prior manual assignment.
  • Cancels a previous manual assignment for the processes specified in pid_list or pgid_list.
  • Assigns the Workload Manager (WLM) tag process attribute to a set of processes specified by a list of pids or pgids.
  • Removes the WLM tag process attribute from a set of processes specified by a list of pids or pgids.

In addition to the tag, additional inheritance suboptions can be specified and these suboptions indicates to the WLM if a child process must inherit the tag from its parent after fork or exec subroutine.

The process requires at least the SIGPRIV privileges or higher for tagging another process.

The WLM tag assignment remains in effect until one or more of the following conditions are true:

  • The tag is removed by using the -r flag.
  • The tagged process is ended.
  • The tag is overwritten with a new tag.

When a WLM tag is assigned to a process that belongs to a class that has the inheritance property turned off, it is automatically reclassified according to the current assignment rules and the new tag is taken into account during reclassification. The WLM tag is effective if class inheritance attribute is not specified for the current process class. To override the class inheritance attribute in favor of reclassification based on tag rules, the /usr/samples/kernel/wlmtune command available in the bos.adt.samples PTF, can be used to modify the behavior of WLM. The related tunables follow:

tag_override_super
Indicates to the WLM that superclass inheritance is bypassed in favor of the rule-based classification if a rule matches the process tag. The default value is 0.
tag_override_sub
Indicates to the WLM that subclass inheritance is bypassed in favor of the rule-based classification if a rule matches the process tag. The default value is 0.

For the tag assignment rules-based classification to be effective, the tunable values must be set prior to a WLM reclassification update.

The interactions between automatic assignment (inheritance and rules), inheritance, and manual assignment are detailed in the Workload management in Operating system and device management.

The wlmassign command allows to specify processes using a list of PIDs, a list of PGDIDs, or both. The formats of these lists follow:
pid[,pid[,pid[...]]]
pgid[,pgid[,pgid[...]]]

The name of a valid superclass or subclass must be specified to manually assign the target processes to a class. If the target class is a superclass, each process is assigned to one of the subclasses of the specified superclass according to the assignment rules for the subclasses of this superclass.

A manual assignment remains in effect (and a process remains in its manually assigned class) until:

  • The process terminates
  • Workload Management (WLM) is stopped. When WLM is restarted, the manual assignments in effect when WLM was stopped are lost.
  • The class the process has been assigned to is deleted
  • A new manual assignment overrides a prior one.
  • The manual assignment for the process is canceled using the -u flag.
  • The process calls the exec() routine.

The name of a valid superclass or subclass must be specified to manually assign the target processes to a class. The assignment can be done or canceled at the superclass level, the subclass level or both. When a manual assignment is canceled for a process, or the process calls exec(), the process is then subject to automatic classification; if inheritance is enabled for the class that the process is in, it will remain in that class, otherwise the process will be reclassified according to the assignment rules.

For a manual assignment:

  • If the Class_Name is the name of a superclass, the processes in the list are assigned to the superclass. The subclass is then determined, for each process, using the assignment rules for the subclasses of the target superclass.
  • If the class name is a subclass name (supername.subname), the processes by default are assigned to both the superclass and the subclass. The processes can be assigned to the superclass only by specifying the -S flag or the subclass only by specifying the -s flag.
wlmassign   super1.sub2  -S  pid1

is equivalent to:

wlmassign super1 pid1

To assign a process to a class or cancel a prior manual assignment, the user must have authority both on the process and on the target class. These constraints translate into the following:

  • The root user can assign any process to any class.
  • A user with administration privileges on the subclasses of a given superclass (that is, the user or group name matches the user or group names specified in the attributes adminuser and admingroup of the superclass) can manually reassign any process from one of the subclasses of this superclass to another subclass of the superclass.
  • Users can manually assign their own processes (same real or effective user ID) to a class, for which they have manual assignment privileges (that is, the user or group name matches the user or group names specified in the attributes authuser and authgroup of the superclass or subclass).

This defines 3 levels of privilege among the persons who can manually assign processes to classes, root being the highest. For a user to modify or terminate a manual assignment, they must have at least the same level of privilege as the person who issued the last manual assignment.

Note: The wlmassign command works with currently loaded WLM configuration. If the current configuration is a set, and the assignment is made to a class which does not exist in all configurations in the set, the assignment will be lost when a configuration that does not contain the class becomes active (class is deleted).

Flags

Item Description
-g pgid_list Indicates that the following list is a list of PGID.
-S Specifies that the assignment is to be done or canceled at the superclass level only. This flag is used with a subclass name of the form supername.subname.
-s Specifies that the assignment is to be done or canceled at the subclass level only. This flag is used with a subclass name of the form supername.subname.
-u Cancel any manual assignment in effect for the processes in the pid_list or the pgid_list. If none of the -s or -S flags are used, this cancels the manual assignments for both the superclass and the subclass level.
-r Removes a WLM tag from the specified process or the process group list.
-t tag Sets a WLM tag for the specified process or the process group list.
-i inheritance

Specifies one or both tag inheritance sub-options in a comma-separated list. The following tag inheritance sub-options can be specified:

fork
Specifies that the children of this process should inherit the parent tag across fork.
exec
Specifies that the process retains its tag after a call to exec.