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

[Xen-devel] Problems with host_cpu in XenAPI


  • To: "Xen Developers" <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: "Niraj Tolia" <ntolia@xxxxxxxxx>
  • Date: Sun, 6 Apr 2008 18:54:43 -0700
  • Delivery-date: Sun, 06 Apr 2008 18:55:08 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=icU5LV3rKi9zq64Y5Ih/h105wLhctJBvaiTGm8wSs2d3mNEYqp4DIWFPbZxV1opGbEZepQ8WbZzb3xS6NLChGgalSB6fggo3NK+LIh7xp7VivazAN362CZWjYq3U4vdIdIrzYXbyuHFIRjNoibriUkgF2w4AOOIiLydLflz8jd8=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

I was under the assumption that host_cpu would give me metrics for the
physical CPUs instead of virtual ones. However, when I run the
following code, I only get Dom0's CPU usage. It does not reflect the
load of any of the other VMs. Is this the expected behavior?

I also noticed that the values are only updated every 2 seconds or so.
Is there any way to tune this interval?

while True:
    recs = session.xenapi.host_cpu.get_all_records()
    for key in recs.keys():
        sys.stdout.write("%0.3f, " % recs[key]['utilisation'])
    print
    time.sleep(1)

Thanks,
Niraj

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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