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

Technical Reference: Base Operating System and Extensions , Volume 2

wlm_create_class Subroutine


Creates a new Workload Manager (WLM) class.


Workload Manager Library (libwlm.a)


#include <sys/wlm.h>

int wlm_create_class ( wlmargs)

struct wlm_args *wlmargs;


The wlm_create_class subroutine creates a new class for a given WLM configuration using the values passed in the data structure of type structwlm_args pointed to by wlmargs.

The structure of type struct class_definition, which is part of struct wlm_args, has normally been initialized with a call to wlm_init_class_definition. Once this has been done, initialize the fields of this structure which have no default value (such as the name of the new class) or for which the desired value is different from the default value. For a description of the possible values for all the class attributes and their default values, refer to the description of wlm.h in the AIX 5L Version 5.1 Files Reference.

The caller must have root authority to create a superclass and must have administrator authority on a superclass to create a subclass of the superclass.


wlmargs Specifies the address of the struct wlm_args data structure containing the class_definition structure for the new class to be created.

The following fields of the wlm_args structure and the embedded substructures need to be provided:

versflags Needs to be initialized with WLM_VERSION.
confdir Specifies the name of the WLM configuration the new class is to be added to. It must be either the name of a valid subdirectory of /etc/wlm or an empty string (starting with '\0').

If the name is a valid subdirectory, the new class data is added to the given WLM configuration's class description files.

If the name is a null string, no description files are updated. The new class is created and the data is passed to the kernel immediately.

name Specifies the name of the superclass or of the subclass to be created. If this is a subclass name, it must be of the form super_name.sub_name. There is no default for this field.

All the other fields can be left at their default value if the user does not wish to use specific values.

Return Values

Upon successful completion, the wlm_create_class subroutine returns a value of 0. If the wlm_create_class subroutine is unsuccessful, a non-0 value is returned.

Error Codes

For a list of the possible error codes returned by the WLM API functions, see the description of the wlm.h header file.

Related Information

The mkclass command, chclass command, rmclass command.

The wlm.h header file.

The wlm_change_class (wlm_change_class Subroutine) subroutine, wlm_delete_class (wlm_delete_class Subroutine) subroutine.

Workload Management in AIX 5L Version 5.1 System Management Concepts: Operating System and Devices.

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