Loads a Workload Manager (WLM) configuration into the kernel.
Workload Manager Library (libwlm.a)
#include <sys/wlm.h>
int wlm_load ( wlmargs)
struct wlm_args *wlmargs;
The wlm_load subroutine loads into the kernel the property files for the WLM configuration passed in the confdir field of the wlmargs structure. The confdir field may also refer to a set of time-based configurations, in which case the appropriate configuration of the set will be loaded and the WLM daemon will later switch to the other configurations of the set on a time basis.
If the WLM is running and confdir is not current, this leads to switch to the specified configuration (or configuration set).
If the caller of wlm_load has root privileges and does not specify a superclass, the flags passed in versflags can be used to start WLM in active or passive mode, switch between active and passive modes, or enable/disable the rset bindings or the process or class total limits. The wlm_load subroutine cannot be used to stop WLM. Use the wlm_set subroutine instead.
Item | Description |
---|---|
wlmargs | Specifies the address of the struct wlm_args data structure containing information about the configuration (or configuration set or superclass) to be loaded and the mode of operation of WLM. |
The following fields of the wlm_args structure and the embedded substructures can be provided:
Item | Description |
---|---|
versflags | Needs to be initialized with WLM_VERSION. May be ORed with
WLM_MUTE for wlm_load to be silent. If no change must be done to the mode of operation of WLM, it must be ORed with WLM_TEST_ON (mandatory if superclass is specified). Otherwise, one of the mutually exclusive flags (WLM_ACTIVE, WLM_CPUONLY, or WLM_PASSIVE) must be given. One or more of the WLM_BIND_RSETS, WLM_PROCTOTAL, or WLM_CLASSTOTAL flags can be given optionally. |
confdir | Specifies the name of the WLM configuration to be loaded into the kernel. It must be either the name of a valid configuration or configuration set in the /etc/wlm subdirectory, the current string to refer to the active configuration, or, if superclass is specified and current is a configuration set, it must indicate which configuration of current set the superclass belongs to in the form: current/config (this is different from specifying config only, which is considered a configuration switch request). |
name | Specifies the name of a superclass. This is used to refresh only the subclasses of a given superclass. |
Upon successful completion, the wlm_load subroutine returns a value of 0. If the wlm_load subroutine is unsuccessful, a nonzero 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.