The mi_class_numvp() function
The mi_class_numvp() function obtains the number of active virtual processors (VPs) in a VP class.
Syntax
mi_integer mi_class_numvp(VPclass_id)
mi_integer VPclass_id;
- VPclass_id
- A VP-class identifier for the VP class whose number of active
VPs the function is to return. This argument can be either of the
following values:
- A valid VP-class identifier
- Obtains the number of active VPs in the specified VP class.
- MI_CURRENT_CLASS VP-class constant
- Obtains the number of active VPs in the VP class of the current VP.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
No | Yes |
Usage
VPCLASS=newvp, num=3, max=6
The mi_class_numvp() function
returns the value of 3
when it receives the VP-class
identifier for the newvp VP class. However, if the DBA dynamically
adds or removes VPs, the value that mi_class_numvp() returns
might not coincide with the num option. You can obtain a VP-class
identifier with the mi_vpinfo_classid() or mi_class_id() function.
1
. For information about how to obtain information about VPs and VP classes, see the HCL OneDB™ DataBlade API Programmer's Guide.
Return values
- >=0
- The number of active VPs in the VP class associated with the specified VP-class identifier.
- MI_ERROR
- The function was not successful or that the specified VP class does not exist.