Package prlsdkapi :: Class Statistics
[hide private]
[frames] | no frames]

Class Statistics

object --+    
         |    
   _Handle --+
             |
            Statistics

Provides methods for obtaining performance statistics for the host computer or an individual virtual machine. To obtain the Statistics object for the host computer, use the Server.get_statistics method. To obtain the Statistics object for a virtual machine, use the Vm.get_statistics method.

Instance Methods [hide private]
 
get_total_ram_size(self)
Return total RAM size in bytes.
 
get_usage_ram_size(self)
Return the size of RAM currently in use, in bytes.
 
get_free_ram_size(self)
Return free RAM size in bytes.
 
get_real_ram_size(self)
 
get_total_swap_size(self)
Return total swap size in bytes
 
get_usage_swap_size(self)
Return the swap size currently in use, in bytes.
 
get_free_swap_size(self)
Return total swap size in bytes
 
get_os_uptime(self)
Return the virtual machine uptime in seconds.
 
get_disp_uptime(self)
Return the Parallels Service uptime in seconds.
 
get_cpus_stats_count(self)
Return the number of StatCpu objects contained in this Statistics object.
 
get_cpu_stat(self, nIndex)
Return a StatCpu object specified by an index.
 
get_ifaces_stats_count(self)
Return the number of StatNetIface objects contained in this Statistics objects.
 
get_iface_stat(self, nIndex)
Return a StatNetIface object specified by an index.
 
get_users_stats_count(self)
Return the number of StatUser objects contained in this Statistics object.
 
get_user_stat(self, nIndex)
Return a StatUser object specified by an index.
 
get_disks_stats_count(self)
Return the number of StatDisk objects contained in this Statistics object.
 
get_disk_stat(self, nIndex)
Return a StatDisk object specified by an index.
 
get_procs_stats_count(self)
Return the number of StatProcess objects contained in this Statistics object.
 
get_proc_stat(self, nIndex)
Return a StatProcess object specified by an index.
 
get_vm_data_stat(self)

Inherited from _Handle: __del__, __init__, add_ref, free, from_string, get_handle_type, get_package_id, get_type

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

get_total_ram_size(self)

 

Return total RAM size in bytes.

Returns:
An integer containing the total RAM size in bytes.

get_usage_ram_size(self)

 

Return the size of RAM currently in use, in bytes.

Returns:
An integer containing the RAM size currently in use.

get_free_ram_size(self)

 

Return free RAM size in bytes.

Returns:
An integer specifying free RAM size in bytes.

get_total_swap_size(self)

 

Return total swap size in bytes

Returns:
An integer containing the total swap size in bytes.

get_usage_swap_size(self)

 

Return the swap size currently in use, in bytes.

Returns:
An integer containing the swap size in use.

get_free_swap_size(self)

 

Return total swap size in bytes

Returns:
An integer specifying total swap size in bytes.

get_os_uptime(self)

 

Return the virtual machine uptime in seconds. The virtual machine uptime is counted from the date the counter was started. The date can be determined using the VmConfig.get_uptime_start_date method.

Returns:
A string containing the virtual machine uptime in seconds.

get_disp_uptime(self)

 

Return the Parallels Service uptime in seconds.

Returns:
An integer specifying the Parallels Service uptime in seconds.

get_cpus_stats_count(self)

 

Return the number of StatCpu objects contained in this Statistics object. Each StatCpu object contains statistics for an individual CPU. Use the number returned to iterate through the object list and obtain individual objects using the Statistics.get_cpu_stat method.

Returns:
Integer. The number of StatCpu objects contained in this Statistics object.

get_cpu_stat(self, nIndex)

 

Return a StatCpu object specified by an index. To obtain the total number of object in the list, use the Statistics.get_cpus_stats_count method.

Parameters:
  • nIndex - Integer. An index of an object in the list (begins with 0).
Returns:
A StatCpu object containing statistis for a given CPU.

get_ifaces_stats_count(self)

 

Return the number of StatNetIface objects contained in this Statistics objects. Each object contains statistics for an individual network interface.

Returns:
Integer. The number of StatNetIface objects contained in this Statistics objects.

get_iface_stat(self, nIndex)

 

Return a StatNetIface object specified by an index. To obtain the number of objects in the list, use the Statistics.get_ifaces_stats_count method.

Parameters:
  • nIndex - Integer. An index of an object in the list (begins with 0).
Returns:
A StatNetIface object containing statistis for a given network interface.

get_users_stats_count(self)

 

Return the number of StatUser objects contained in this Statistics object. Each StatUser object contains statistics for an individual system user. Use the number returned to iterate through the object list and obtain individual objects using the Statistics.get_user_stat method.

Returns:
Integer. The number of StatUser objects contained in this Statistics object.

get_user_stat(self, nIndex)

 

Return a StatUser object specified by an index. To obtain the number of objects in the list, use the Statistics.get_users_stats_count method.

Parameters:
  • nIndex - Integer. An index of an object in the list (begins with 0).
Returns:
A StatUser object containing statistis for a given system user.

get_disks_stats_count(self)

 

Return the number of StatDisk objects contained in this Statistics object. Each StatDisk object contains statistics for an individual hard disk. Use the number returned to iterate through the object list and obtain individual objects using the Statistics.get_disk_stat method.

Returns:
Integer. The number of StatDisk objects contained in this Statistics object.

get_disk_stat(self, nIndex)

 

Return a StatDisk object specified by an index. To obtain the number of objects in the list, use the Statistics.get_disks_stats_count method.

Parameters:
  • nIndex - Integer. An index of an object in the list (begins with 0).
Returns:
A StatDisk object containing statistis for a given hard disk.

get_procs_stats_count(self)

 

Return the number of StatProcess objects contained in this Statistics object. Each StatProcess object contains statistics for an individual system process. Use the number returned to iterate through the object list and obtain individual objects using the Statistics.get_proc_stat method.

Returns:
Integer. The number of StatProcess objects contained in this Statistics object.

get_proc_stat(self, nIndex)

 

Return a StatProcess object specified by an index. To obtain the number of objects in the list, use the Statistics.get_procs_stats_count method.

Parameters:
  • nIndex - Integer. An index of an object in the list (begins with 0).
Returns:
A StatProcess object containing statistis for a given system process.