From: "Niraj Tolia" Subject: Problems with host_cpu in XenAPI Date: Sun, 6 Apr 2008 18:54:43 -0700 Message-ID: <7e45e2ac0804061854i2f10bb20l36a6a8ebced33d19@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Developers List-Id: xen-devel@lists.xenproject.org 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