Reads the characteristics of superclasses or subclasses.
Workload Manager Library (libwlm.a)
int wlm_read_classes ( wlmargs, class_tbl, nclass)
struct wlm_args *wlmargs;
struct class_definition *class_tbl
The wlm_read_classes subroutine is used to get the characteristics of the superclasses or the subclasses of a given subclass of a Workload Manager (WLM) configuration.
Note: These values may be different from the values in the property files of the configuration pointed to by /etc/wlm/current. For instance when a WLM administrator has modified the property files for the configuration pointed to by /etc/wlm/current but has not refreshed WLM yet. Another example is if applications dynamically created or modified classes through the API without saving the changes in the current configuration property files.
If your application specifically needs to access the properties of the classes as described in the /etc/wlm/current configuration, you must specify current as the configuration name in confdir.
If the number of elements copied by wlm_read_classes is strictly smaller than the number of elements passed as an argument, all the classes have been read. If it is equal, it may mean that some classes were not copied into the class_tbl array because its size is too small.
The maximum number of classes read by wlm_read_classes is 32 when reading superclasses and 12 when reading subclasses characteristics.
This operation does not require any special privileges and is accessible to all users.
|wlmargs||Specifies the address of a struct wlm_args data
The following fields of the wlm_args structure and the embedded substructures need to be provided:
All the other fields can be left uninitialized.
|class_tbl||Specifies the address of an array of structures of type struct class_definition. Upon successful return from wlm_read_classes, this array contains the characteristics of the classes read.|
|nclass||Specifies the address of an integer containing the maximum number of element (class definitions) for wlm_read_classes to copy into the array above. If the call to wlm_read_classes is successful, this integer contains the number of elements actually copied.|
Upon successful completion, the wlm_read_classes subroutine returns a value of 0. If the wlm_read_classes subroutine is unsuccessful, a non-0 value is returned.
For a list of the possible error codes returned by the WLM API functions, see the description of the wlm.h header file.
The lsclass command.
The wlm.h header file.