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_os_uptime(self)
Return the virtual machine 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.

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

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_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_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.