Collapse All
Parallels Virtualization SDK
ContentsIndex
PreviousUpNext
PHT_SYSTEM_STATISTICS
Functions  Functions by Handle  Legend

The PHT_SYSTEM_STATISTICS handle is used to obtain performance statistics for the host computer or an individual virtual machine.

Description

There are two main methods for obtaining a handle of type PHT_SYSTEM_STATISTICS:

  1. Using PrlSrv_GetStatistics (for host statistics) or PrlVm_GetStatistics (for virtual machine statistics).
  2. Using PrlSrv_SubscribeToHostStatistics (for host statistics) or PrlVm_SubscribeToGuestStatistics (for virtual machine statistics) to receive statistics events, and PrlSrv_UnsubscribeFromHostStatistics or PrlVm_UnsubscribeFromGuestStatistics to stop receiving statistics events. A callback function (event handler) implementation is required to use subscriptions.

The PHT_SYSTEM_STATISTICS object provides methods for obtaining handles to objects containing the performance data of a specific type. It also provides methods for obtaining memory statistics directly from it. The steps in obtaining the performance data are as follows:

  1. Obtain a handle of type PHT_SYSTEM_STATISTICS.
  2. To obtain memory statistics, use the functions provided by the object.
  3. For other statistics (CPU, disk, network, etc.), first use a corresponding function to obtain a handle of a particular type, and then use the functions of the received object to get the statistics.
Functions
 
Name 
Description 
 
Determines the number of handles of type PHT_SYSTEM_STATISTICS_CPU contained in the specified PHT_SYSTEM_STATISTICS object. 
 
Obtains a handle of type PHT_SYSTEM_STATISTICS_CPU containing the specified CPU statistics. 
 
Determines the number of handles of type PHT_SYSTEM_STATISTICS_DISK contained in the specified PHT_SYSTEM_STATISTICS object. 
 
Obtains a handle of type PHT_SYSTEM_STATISTICS_DISK containing the specified disk statistics. 
 
Returns the Parallels Service uptime in seconds. 
 
Returns free RAM size in bytes. 
 
Returns free swap size in bytes. 
 
Determines the number of objects of type PHT_SYSTEM_STATISTICS_IFACE contained in the specified PHT_SYSTEM_STATISTICS object. 
 
Obtains a handle of type PHT_SYSTEM_STATISTICS_IFACE containing the specified network interface statistics. 
 
Returns the total virtual machine usage time in seconds. 
 
Determines the number of handles of type PHT_SYSTEM_STATISTICS_PROCESS contained in the specified PHT_SYSTEM_STATISTICS object. 
 
Obtains a handle of type PHT_SYSTEM_STATISTICS_PROCESS containing the specified system process statistics. 
 
Returns the amount of physical memory, in bytes, currently occupied by the virtual machine. 
 
Returns total RAM size in bytes. 
 
Returns total swap size in bytes. 
 
Returns the size RAM currently in use (in bytes). 
 
Returns the size of swap space currently in use (in bytes). 
 
Determines the number of handles of type PHT_SYSTEM_STATISTICS_USER_SESSION contained in the specified PHT_SYSTEM_STATISTICS object. 
 
Obtains a handle of type PHT_SYSTEM_STATISTICS_USER_SESSION containing the specified user session statistics. 
 
Obtains a handle of type PHT_SYSTEM_STATISTICS_VM_DATA containing the specified system VM data statistic. 
Links
© 2021 Parallels International GmbH. All rights reserved.