wlm_create_class Subroutine

Purpose

Creates a new Workload Manager (WLM) class.

Library

Workload Manager Library (libwlm.a)

Syntax

#include <sys/wlm.h>

int wlm_create_class ( wlmargs)

struct wlm_args *wlmargs;

Description

The wlm_create_class subroutine creates a new class for a given WLM configuration using the values passed in the data structure of type struct wlm_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® Version 7.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.

Note: Do not specify a set in the confdir field of the wlm_args structure. The wlm_create_class subroutine cannot apply to a set of time-based configurations.

Parameter

Item Description
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:

Item Description
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 nonzero 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.