wlm_class2key Subroutine

Purpose

Class name to key translation.

Library

Workload Manager Library (libwlm.a)

Syntax

#include <sys/wlm.h

int wlm_class2key ( struct wlm_args *args, wlm_key_t *key)

Description

The wlm_class2key subroutine generates a 64-bit numeric key from a WLM class name. The wlm_class2key subroutine is provided for applications gathering high volumes of per-class usage statistics or accounting data and allows those applications to save storage space by compressing the class name (up to 34 characters long) into a 64-bit integer. The wlm_key2class subroutine can then get the key-to-class name conversion for data reporting purposes

Parameters

Item Description
wlm_args Only 2 fields need to be initialized in the wlm_args structure pointed to by args:
  • cl_def.data.descr.name specifies the null terminated full name of the class (<super_name.<subname for a subclass).
  • versflags initialized with WLM_VERSION and optionally WLM_MUTE.

Return Values

If the wlm_class2key subroutine is successful, a value of 0 is returned. If the wlm_class2key subroutine is unsuccessful, an error code is returned.

Error Codes

If the wlm_class2key subroutine is unsuccessful, one of the following error codes is returned:

Item Description
WLM_NOT_INITED Missing call to wlm_init.
WLM_EFAULT Invalid key or args pointer.
WLM_BADCNAME The class name contains invalid characters.