mi_integer mi_class_numvp(VPclass_id)
mi_integer VPclass_id;
The mi_class_numvp( ) function returns the number of active VPs in the VP class that the VPclass_id argument specifies. An active VP is a VP that is currently executing a task. The number of active VPs is initially the value assigned with the num option in the VPCLASS configuration parameter. For example, suppose you have the following VPCLASS configuration parameter:
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.
This function is useful to determine if the current VP is part of a single-instance VP class. For such a VP class, the mi_class_numvp( ) function returns a value of 1.
See also the descriptions of mi_class_id( ), mi_class_maxvps( ), mi_class_name( ), and mi_vpinfo_classid( )).
For information about how to obtain information on VPs and VP classes, see the IBM Informix: DataBlade API Programmer's Guide.