WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Problems with host_cpu in XenAPI

To: "Xen Developers" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Problems with host_cpu in XenAPI
From: "Niraj Tolia" <ntolia@xxxxxxxxx>
Date: Sun, 6 Apr 2008 18:54:43 -0700
Delivery-date: Sun, 06 Apr 2008 18:55:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=tJMtVNsWzwRTlfoNkWW2a0QEarrRyLytudwHrfjebNI=; b=Q2+ZaC+bxyzuDCynFI/FMfLXLxGrFKDays4BJebYs4feG5fHMDZ2jBbDnVOIhg6or4qzG28vN24e32MSQUgiCdPmPhDUNtw8hCYFyA8BSlzMjr2TlGKJM8kmlsSHUiILUww/kQ8PB8zeKmmGGR42Dfqbe10TmgqC85a825aIVjc=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Problems with host_cpu in XenAPI, Niraj Tolia <=