Change the attributes and resource entitlements of a Workload Management class.
chclass -a Attribute=Value {[-a Attribute=Value]...} [ -c | -m | -b | -v | -C | -B | -P | -T | -L | -V | -A KeyWord=Value] [ -d Config_Dir] [ -S SuperClass] Name
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), -A (totalConnectTime), or -v (totalVirtualMemoryLimit), 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), -L (totalLogins), or -V (totalVirtualMemoryLimit), 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).
The following attributes can be changed:
Class properties:
Item | Description |
---|---|
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 is more favored. The tier value ranges from 0 through 9 (the default is 0). |
inheritance | If the inheritance attribute 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 the inheritance attribute is set to no, the assignment rules apply normally. The default if not specified is no. |
localshm | Indicates whether memory segments that are accessed by processes in different classes remain local to the class they were initially assigned to or if they go to the Shared class. You can specify a value of Yes or No. If not specified, the default is No. |
authuser | Specifies the user name of the user who is 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 that is allowed to assign processes to this class. There is no default value. |
rset | Specifies the name of a resource set that the processes in the class have access to. By default, the class has access to all resources on the system. |
vmenforce | Specifies whether all processes or only the offending processes in the class need to be terminated when the class hits the maximum VM limit. You can specify the value of class or proc. The default value is proc. |
delshm | Specifies whether the shared segments will be deleted when the last process referencing them ends because virtual memory is exceeded. You can specify the value of yes or no. The default value is no. |
adminuser | Specifies the user name of the user who is 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 users can administer
the subclasses. Note: If the adminuser or admingroup attribute is changed for a superclass that belongs to the running
configuration (or to a configuration of the running set), a global
WLM update should be performed to reflect these changes to the in-core
configuration, elsewhere, updates that are restricted to superclass
by such a user might fail due to lack of authority.
|
admingroup | Specifies the group name of the group of users that is 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 the adminuser or admingroup attribute is changed for a superclass that belongs to the running
configuration (or to a configuration of the running set), a global
WLM update should be performed to reflect these changes to the in-core
configuration, elsewhere, updates that are restricted to superclass
by such a user might fail due to lack of authority.
|
iopriority | Specifies the priority that is assigned to I/O requests. The I/O requests are issued by the threads that are classified to the class. The priority is used to prioritize I/O buffers at the device level. If the storage device does not support I/O priorities, the priority is ignored. Valid I/O priority values range from 0 through 15. |
Class limits and shares for CPU, memory, or disk I/O resource:
Item | Description |
---|---|
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 through 100 (the 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 ranging from 1 through 65535. If shares is specified as a hyphen (-), the class is always considered on target and 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 through 100 (the 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 through 100 (the default is 100). Specifying a value different from the default value of 100 for memory can result in some memory pages remaining unused, while some processes in the class 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 through 100 (the default is 100). Specifying a value different from the default value of 100 for memory can result in some memory pages remaining unused, while some processes in the class use more. |
Note: The default values for a class can be read using the lsclass -D command and can be changed by manually editing the property files classes, shares, or limits to add a default stanza. For more information about these files, see the AIX® Version 7.1 Files Reference.
Class description:
Item | Description |
---|---|
description | The class description text can be composed of any ASCII character, except colons (:) and commas (,). |
Item | Description |
---|---|
-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:
|
-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. |
-v hardmax=Value | Specifies the virtual memory limit allowed per process in the specified class. The maximum amount of virtual memory allowed per process is (2^31)-1 for 32-bit kernels and (2^63)-1 for 64-bit kernels. |
-V hardmax=Value | Specifies the virtual memory allowed for the specified class. The maximum amount of virtual memory allowed per process is (2^31)-1 for 32-bit kernels and (2^63)-1 for 64-bit kernels. |
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.
Item | Description |
---|---|
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. |