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

Commands Reference, Volume 3

mkclass Command

Purpose

Create a Workload Management class.

Syntax

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

Description

The mkclass command creates a superclass or a subclass identified by the Name parameter. The class must not already exist. The Name parameter can contain only upper and lower case letters, numbers and underscores. The name is in the format supername or subname (with the -S supername flag) or supername.subname. Supername and subname are each limited to 16 characters in length. The names Default, System, and Shared are reserved. They refer to predefined classes. Any Attribute=Value or KeyWord=Value argument initialise the specified attribute or resource limit. See chclass for more information. 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).

Normally, mkclass adds the class and its attributes in the relevant WLM property files, and the modifications is applied to the in-core class definitions (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 class is created only in the WLM in-core data structures, and no property file is updated, making the new class 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.

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 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 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 Use /etc/wlm/Config_Dir as an alternate directory for the properties files. When this flag is not used, mkclass uses the configuration files in the directory pointed to by /etc/wlm/current. If an empty string is passed as the configuration name (-d "") the new class is created only in the WLM in-core data structures 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.
-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 creating a subclass. There are two ways of creating the subclass Sub of superclass Super:
  1. Specify the full name of the subclass as Super.Sub for Name and not use -S
  2. Specify the -S flag to give the superclass name and use the short name for the subclass:

    mkclass 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.

Security

Access control: Only the root user can create 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 create a subclass of this superclass.

Files

classes Contains the names and definitions of the classes.
limits Contains the resource limits enforced each class.
shares Contains the resource shares attributed to each class.

Related Information

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

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