wlm_set Subroutine

Purpose

Sets or queries the Workload Manager (WLM) state.

Library

Workload Manager Library (libwlm.a)

Syntax

#include <sys/wlm.h>

int wlm_set ( flags)
int  *flags;

Description

The wlm_set subroutine is used to set, change, or query the mode of operations of WLM. The state of WLM can be:

Item Description
OFF Does not classify processes, monitor or regulate resource utilization.
ON in passive mode Classifies the processes and monitors their resource usage but does no regulation.
ON in active mode Specifies the normal operating mode where WLM classifies processes, monitors and regulates the resource usage.

Parameters

Item Description
flags Specifies the address of an integer interpreted in a manner similar to the versflags field of the wlmargs structure passed to the other API routines. The integer pointed to by flags should be initialized with WLM_VERSION. In addition, one or more of the following values can be or'ed to WLM_VERSION:
WLM_TEST_ON
Queries the state of WLM without altering it.
WLM_OFF
Turns WLM off.
WLM_ACTIVE
Turns WLM on in active mode or transitions from any mode to active mode.
WLM_CPU_ONLY
Turns WLM on in active mode for CPU resource only, or transitions from any mode to this mode. This is the same as WLM_ACTIVE, but only CPU resources are regulated. Other resources (memory, disk IO, and total limits when enabled) are still accounted.
WLM_PASSIVE
Turns WLM on in passive mode or transitions from any mode to passive mode.
WLM_BIND_RSETS
Requests that WLM takes the resource set bindings into account.
WLM_PROCTOTAL
Enables process total limits on resource usage.
WLM_CLASSTOTAL
Enables class total limits on resource usage.
Some combinations of the flags above are not legal:
  • WLM_OFF, WLM_ACTIVE, WLM_CPU_ONLY, and WLM_PASSIVE are mutually exclusive.
  • WLM_BIND_RSETS, WLM_PROCTOTAL, and WLM_CLASSTOTAL, are ineffective when used together with WLM_OFF.
  • Only WLM_TEST_ON is allowed to non-root users.
  • If WLM_TEST_ON is specified, the other flags are ineffective and should not be specified.

Return Values

Upon successful completion, the wlm_set subroutine returns a value of 0, and the current state of WLM is returned in the flags parameter. The return value is WLM_OFF, WLM_ACTIVE, WLM_CPU_ONLY, or WLM_PASSIVE. When WLM is on in either mode, the WLM_BIND_RSETS, WLM_PROCTOTAL, and WLM_CLASSTOTAL, flags are added when appropriate.

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 wlmcntrl command.

The wlm.h header file.

The wlm_load (wlm_load Subroutine) subroutine.