Parent

Pangea::VMMetrics

Metrics associated with a VM

xen-api class: VM_metrics

Public Instance Methods

last_updated() click to toggle source

xen-api: VM_metrics.get_last_updated

# File lib/pangea/objects.rb, line 530
    def last_updated
      (ref_call :get_last_updated).to_time
    end
memory_actual() click to toggle source

xen-api: VM_metrics.get_memory_actual

# File lib/pangea/objects.rb, line 487
    def memory_actual
      ref_call :get_memory_actual
    end
start_time() click to toggle source

xen-api: VM_metrics.get_start_time

# File lib/pangea/objects.rb, line 523
    def start_time
      (ref_call :get_start_time).to_time
    end
state() click to toggle source

xen-api: VM_metrics.get_state

# File lib/pangea/objects.rb, line 516
    def state
      ref_call :get_state
    end
to_s() click to toggle source

(Not documented)

# File lib/pangea/objects.rb, line 534
    def to_s
      vcpu_u = ""
      vcpus_utilisation.each do |k, v|
        vcpu_u += "#{k}: %0.2f\n" % (v * 100)
      end
      eol = "\n"
      "[VM Metrics]" + eol +
      "State: #{state}" + eol +
      "Start Time: #{start_time}" + eol +
      "Last Updated: #{last_updated}" + eol +
      "VCPUs Utilisation:" + eol +
      vcpu_u
    end
vcpus_number() click to toggle source

xen-api: VM_metrics.get_VCPUs_number Number of cpus assigned to the domU

# File lib/pangea/objects.rb, line 495
    def vcpus_number
      ref_call :get_VCPUs_number
    end
vcpus_utilisation() click to toggle source

xen-api: VM_metrics.get_VCPUs_utilisation

returns a hash {

  cpu0 => utilisation,
  cpu1 => utilization,
  ...

}

# File lib/pangea/objects.rb, line 509
    def vcpus_utilisation
      ref_call :get_VCPUs_utilisation
    end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.