[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 1

chclass Command

Purpose

Change the attributes and resource entitlements of a Workload Management class.

Syntax

chclass -a Attribute=Value {[-a Attribute=Value]...} [ -c | -m | -b | -C | -B | -P | -T | -L | -A KeyWord=Value] [ -d Config_Dir] [ -S SuperClass] Name

Description

The chclass command changes attributes for the class identified by the Name parameter. The class must already exist. To change an attribute, specify the attribute name and the new value with the Attribute=Value parameter. To change a limit or shares value, use option -c for cpu, -m for memory, and -b for disk I/O throughput, with the keyword value in min, softmax, hardmax or shares. To set the process total limits (the limits that apply to each process of the class), use one or more of the options -C (totalCPU), -B (totalDiskIO) or -A (totalConnectTime), with the keyword value of hardmax. To set the class total limits (the limits that apply to the whole class), use one or more of the options -P (totalProcesses), -T (totalThreads) or -L (totalLogins), with the keyword value of hardmax. To reset any total limit, use "-" for Value. Process, class, or both total limits may be disabled when starting or updating the WLM (see wlmcntrl command).

Note: Only the root user can change the attributes of a superclass. Only root or authorized users whose user ID or group ID matches the user name or group name specified in the attributes adminuser and admingroup of a superclass can change the attributes of a subclass of this superclass.

Normally, chclass updates the attributes of a class in the relevant WLM property files, and the modifications are applied to the in-core class definition (active classes) only after an update of WLM using the wlmcntrl command.

If an empty string is passed as the configuration name (Config_dir) with the -d flag, the change applies only to the in-core class attributes, and no property file is updated, making the changes temporary (the change is lost if WLM is stopped and restarted or the system is rebooted).

Note
This command cannot apply to a set of time-based configurations (do not specify a set with the -d flag). If the current configuration is a set, the -d flag must be given to indicate which regular configuration the command should apply to.

Attributes

The following attributes can be changed:

Class properties:

tier Specifies the tier value. The tier value for a class is the position of the class in the hierarchy of resource limitation desirability for all classes. A class with a lower tier value will be more favored. The tier value is a number from 0 to 9 (default is 0).
inheritance If inheritance is set to yes, the children of processes in this class remain in the class upon exec regardless of the automatic assignment rules in effect. If inheritance is set to no, the assignment rules apply normally. The default if not specified is no.
localshm Indicates whether memory segments accessed by processes in different classes remain local to the class they were initially assigned to or if they go to the Shared class. The possible value is Yes or No. If not specified, the default is No.
authuser Specifies the user name of the user allowed to assign processes to this class. The default when the attribute is not specified is root.
authgroup Specifies the group name of the group of users allowed to assign processes to this class. There is no default value.
rset Specifies the name of a resource set the processes in the class have access to. The default is that the class has access to all the resources on the system.
adminuser Specifies the user name of the user allowed to administer the subclasses of this superclass. This attribute is valid only for superclasses. The default, when the attribute is not specified is a null string, and, in this case, only root can administer the subclasses.
Note
If adminuser or admingroup are changed for a superclass which belongs to the running configuration (or to a configuration of the running set), a global WLM update should be performed in order to reflect these changes to the in-core configuration, elsewhere, restricted to superclass updates by such a user may fail due to lack of authority.
admingroup Specifies the group name of the group of users allowed to administer the subclasses of this superclass. This attribute is valid only for superclasses. The default value, when the attribute is not specified is a null string, meaning that no group can administer the subclasses.
Note
If adminuser or admingroup are changed for a superclass which belongs to the running configuration (or to a configuration of the running set), a global WLM update should be performed in order to reflect these changes to the in-core configuration, elsewhere, restricted to superclass updates by such a user may fail due to lack of authority.

Class limits and shares for CPU, memory, or disk I/O resource:

min Specifies the minimum percentage of the resource that must be made available when requested, expressed as a percentage of the total resource available in the system. Possible values range from 0 to 100 (default is 0).
shares Specifies the maximum ratio of the resource that can be made available if there is contention. This parameter is expressed in shares of the total resource available in the system. The actual ratio of the resource is dynamically computed, proportionally to the shares of all active classes. If a class has no running process, its shares are excluded from the computation. The shares are arbitrary numbers from 1 to 65535. If shares is specified as hyphen ('-'), this means that the class is always considered on target and that its utilization for this resource is not regulated by WLM, but the minimum and maximum limits if any still apply. This is the default if the shares for a resource are not specified.
softmax Specifies the maximum percentage of the resource that can be made available, when there is contention. Possible values range from 1 to 100 (default is 100). A class can exceed its soft maximum for a given resource if there is no contention on the resource.
hardmax Specifies the maximum percentage of the resource that can be made available, even if there is no contention. Possible values range from 1 to 100 (default is 100). Specifying a value different from the default 100 for memory can result in some memory pages remaining unused, while some processes in the class could use more.
max Specifies the maximum percentage of the resource that can be made available, even if there is no contention. Possible values range from 1 to 100 (default is 100). Specifying a value different from the default 100 for memory can result in some memory pages remaining unused, while some processes in the class could use more.

Note: The default values for a class can be read using lsclass -D and can be changed by manually editing the property files classes, shares, or limits to add a default stanza. See the description of these files in the AIX 5L Version 5.2 Files Reference for details.

Class description:

description The class description text can be composed of any ASCII character, except colon (:) and comma (,).

Flags

-A hardmax=Value Sets the maximum amount of time a login session in the class can stay active. Value is specified as an integer, possibly appending the unit (s for seconds, m for minutes, h for hours, d for days, and w for weeks, default is seconds). As a user approaches this connection time limit, WLM will send a warning message to the session terminal. When the limit is reached, the user will be notified and the session leader will be sent the SIGTERM signal, and after a short grace period, the session will be terminated (SIGKILL).
-b KeyWord=Value Changes a limit or shares value for disk I/O throughput. Possible KeyWords are min, softmax, hardmax, or shares.
-B hardmax=Value Sets the total amount of disk I/Os allowed for each process in the class. Value is specified as an integer, possibly appending the unit (KB for kilobytes, MB for megabytes, TB for terabytes, PB for petabytes, and EB for exabytes, default is kilobytes). After a process has used this amount of disk I/Os, the process will be sent the SIGTERM signal, and after a grace period, it will be killed (SIGKILL).
-c KeyWord=Value Changes a limit or shares value for a CPU. Possible KeyWords are min, softmax, hardmax, or shares.
-C hardmax=Value Sets the total amount of CPU time allowed for each process in the class. Value is specified as an integer, possibly appending the unit (s for seconds, m for minutes, h for hours, d for days, and w for weeks, default is seconds). After a process has used this amount of time, the process will be sent the SIGTERM signal, and after a grace period, it will be killed (SIGKILL).
-d Config_Dir Uses the /etc/wlm/Config_Dir directory as alternate directory for the properties files. If this flag is not present, the current configuration files in the directory pointed to by /etc/wlm/current are used. If an empty string is passed as the configuration name (-d "") the modifications only affect the in-core class definition and no configuration file is modified.
-L hardmax=Value Sets the total number of login sessions simultaneously available in the class. If a user tries to log onto the system and the login shell would end up in a class that has reached the total logins limit, the login operation will fail.
-m KeyWord=Value Changes a limit or shares value for memory. Possible KeyWords are min, softmax, hardmax, or shares.
-P hardmax=Value Sets the maximum number of processes allowed in the class. If an operation would result in a new process entering the class when the class has this many processes in it, the operation will fail.
-S SuperClass Specifies the name of the superclass when changing the attributes of a subclass. There are two ways of specifying that the change is to be applied to the subclass Sub of superclass Super:
  1. Specify the full name of the subclass as Super.Sub and not use -S.
  2. Uses the -S flag to give the superclass name and use the short name for the subclass:

    chclass options -S Super  Sub
-T hardmax=Value Sets the maximum number of threads allowed in the class. If an operation would result in a new thread entering the class when the class has this many processes in it, the operation will fail. The total thread limit must be at least as large as the total process limit for a class. If a class has a total thread limit but no total process limit specified, the total process limit will be set to the total thread limit.

Files

classes Contains the names and definitions of the classes.
limits Contains the resource limits enforced on the classes.
shares Contains the resource shares attributes for each class.

Related Information

The wlmcntrl command, lsclass command, mkclass command, and rmclass command.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]