[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-API] question about check VM host cpu and ram

  • To: Olivier LAMBERT <lambert.olivier@xxxxxxxxx>
  • From: Christopher Winslett <christopherwinslett@xxxxxxxxx>
  • Date: Fri, 18 Sep 2009 07:01:48 -0500
  • Cc: xen-api@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 18 Sep 2009 05:02:13 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=EsiKe0DzeKYqdI3qpBP5MtfFT21yiPC82i/CbDzqu/zf1kWnFMzd+WOi/dTWjbHVWp d7SyvAB9MTNeSA48nqeHnPzq54XCAujyVMStI+kKRq26di9Weac3FAwOuo6jIQNjryxf D9Di9TqHp2AI1MyVHxjFdLHIDZX5odccZ2ivs=
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>


Use "VM_metrics" to see the the hardware reported metrics.
Use "VM_guest_metrics" to see the VM reported metrics.  Probably need to install the XENSource kernel drivers on the guest OS to get these figures; all mine were null too.

What type of figures are you looking for?

The following RPC calls work for me:

sid = Session ID
mid = Metrics ID Associated with VM

VM_metrics.get_record(sid, mid)

It would return a value for memory_actual, VCPUs_number.

In Ruby it would be the following RPC calls:

require "XMLRPC/Client"

s = XMLRPC::Client.new2("https://localhost")
sid = s.call("session.login_with_password", "uname", "pass")["Value"]

mid = "OpaqueRef:xxxxx"

memory = s.call("VM_metrics.get_record", sid, mid)["Value"]["actual_memory"]

That being said, to get utilization numbers, we use a network monitor system like Nagios.


On Fri, Sep 18, 2009 at 5:33 AM, Olivier LAMBERT <lambert.olivier@xxxxxxxxx> wrote:
I'm reading the Xen Management API pdf (Version: API Revision 1.0.6,
Date: 24th July 2008, Stable Release).
It talks about class "VM metrics" (§2.9) and  "VM guest metrics"
(§2.10). But all method call with these classes in RPC send me NULL

Despite it works fine for other classes, like VM, or network etc. All
classes with metrics seems to be not recognized by the API.

Configuration : Dom0 on Debian Lenny, with xen-hypervisor-3.2-1-amd64.

How can I do to gather informations about CPU, ram and network on
domU's with the API ?

Thank you,


xen-api mailing list

Christopher Winslett
xen-api mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.