Read the WLM disk I/O statistics per class or per device.
Workload Manager Library (libwlm.a)
The wlm_get_bio_stats subroutine is used to get the WLM disk IO statistics. There are two types of statistics available:
The type of statistics returned by the function is predicated on the value of the flags argument. The flags argument, together with the dev and class arguments, are used to restrict the scope of the function to a class or a set of classes and/or a device or a set of devices. If the value passed to the routine in the count argument is equal to zero (0), wlm_get_bio_stats does not copy any device statistics (and, in this case, the array argument can be a NULL pointer but sets this count to the number of elements in scope for the specific set of parameters. This is a way of finding out how big an array is needed to get all the information for a given set of classes and devices.
wlm_get_bio_stats does not require any special privileges and is accessible to all users. wlm_get_bio_stats fails if WLM is off.
Item | Description |
---|---|
flags | Need
to be initialized with WLM_VERSION. Optionally,
the following flag values can be or'ed to WLM_VERSION:
One of the flags WLM_BIO_CLASS_INFO or WLM_BIO_DEV_INFO (and only one) must be specified. WLM_SUPER_ONLY and WLM_SUB_ONLYare mutually exclusive. |
dev | Device identification (major, minor) of a disk device.
|
array | Pointer to an array of wlm_bio_class_info_t structures (when WLM_BIO_CLASS_INFO is specified in the flags argument) or an array of wlm_bio_dev_info_t structures (when WLM_BIO_DEV_INFO is specified in the flags argument). A NULL pointer can be passed together with a count of 0 to determine how many elements are in scope for the set of arguments passed. |
count | The address of an integer containing the maximum number of elements to be copied into the array above. If the call to wlm_get_bio_stats is successful, this integer will contain the number of elements actually copied. If the initial value is equal to zero (0), wlm_get_bio_stats sets this value to the number elements selected by the specified combination of flags and class. |
class | A pointer to a character string containing the name of a superclass or subclass. If class is a pointer to an empty string (""), the information for all classes are returned. The class parameter is taken into account only when the flag WLM_BIO_CLASS_INFO is set. |
Upon successful completion, a value of 0 is returned and the value pointed to by count is set to the number of elements copied into the array of structures pointed to by array. If the wlm_get_bio_stats 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 header file sys/wlm.h.