Allows to subscribe to periodically receive perfomance statistics.
PRL_HANDLE PrlSrv_SubscribeToPerfStats( PRL_HANDLE hServer, PRL_CONST_STR sFilter );
PrlApiStat.h
A handle of type PHT_JOB containing the results of this asynchronous operation or PRL_INVALID_HANDLE if there's not enough memory to instantiate the job object.
To obtain statistics, an event handler (callback function) is required. Within the event handler, first check the type of event. Events of type PET_DSP_EVT_PERFSTATS_UPDATED indicate an event containing statistics data. The perfomace statistics repesented by parameters of Event object (a handle of type PHT_EVENT).
For the event handler to be called, it is necessary to register it with PrlSrv_RegEventHandler. When statistics data is no longer required, unsubscribe from statistics events using PrlSrv_UnsubscribeFromHostPerfStats. When events are no longer required, unregister the event handler using PrlSrv_UnregEventHandler.
If method is called more than once, the 'filter' value is updated each time on the Virtuozzo Service side.
To get the return code from the PHT_JOB object, use the PrlJob_GetRetCode function. Possible values are:
PRL_ERR_INVALID_ARG - invalid handle was passed.
PRL_ERR_SUCCESS - function completed successfully.