wlm_change_class Subroutine

Purpose

Changes some of the attributes of a class.

Library

Workload Manager Library (libwlm.a)

Syntax

#include <sys/wlm.h>

int wlm_change_class ( wlmargs)

struct wlm_args *wlmargs;

Description

The wlm_change_class subroutine changes attributes of an existing superclass or subclass. Except for its name, any of the attributes of the class can be modified by a call to wlm_change_class.

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 required fields of this structure (such as the name of the class to be modified) and the fields corresponding to the class attributes you want to modify. For a description of the possible values for the various 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 change the attributes of a superclass and must have administrator authority on a superclass to change the attributes of a subclass of the superclass.

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

Parameters

Item Description
wlmargs Specifies the address of the struct wlm_args data structure containing the class_definition structure for the class to be modified.

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 target class belongs 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 relevant class description file in the given configuration are modified.

If the name is a null string, no description files are updated. The modified class attributes are passed to the kernel similarly to a call to wlm_load.

name Specifies the name of the superclass or of the subclass to be modified. 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 initial value as set by wlm_init_class_definition if the user does not wish to change the current values.

Return Values

Upon successful completion, the wlm_change_class subroutine returns a value of 0. If the wlm_change_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.