[libvirt] Unable to find node's mem and cpu api

Richard W.M. Jones rjones at redhat.com
Mon Sep 1 15:41:43 UTC 2008

On Mon, Sep 01, 2008 at 05:26:28PM +0200, jovialGuy _ wrote:
> I have Xen hypervisor. Can I can memory information from "domain 0" instance
> as well.

Yes, although because of the Xen model where dom0 is just a special
guest, the amount of memory used by dom0 isn't indicative of the
amount of memory available for new guests.  Only the hypervisor knows
that, and we don't expose it through libvirt [1].

> How to get physical utilization of each CPU attached  to host? I
> know this is being handled in virt-top but how?

It's really really complicated.  I could explain it here, but that
would amount to an imprecise description of what is precisely
described in the virt-top code itself.  So you're better off just
going and reading that code to find out how to do it.

lines 595--678.

See also the virt-top FAQ:


[1] AFAIK -- perhaps we do through the NUMA calls?

Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
Read my OCaml programming blog: http://camltastic.blogspot.com/
Fedora now supports 64 OCaml packages (the OPEN alternative to F#)

More information about the libvir-list mailing list