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

RE: [Libvir] More queries

"Xm uptime" gives the uptime of all the domains running. So I believe
there should be a way to get it.
I'm trying to find what interface xm uses. Will update the group once I
get more insight.

-----Original Message-----
From: Richard W.M. Jones [mailto:rjones redhat com] 
Sent: Thursday, December 13, 2007 9:06 PM
To: Katti, Vadiraj (STSD-Openview)
Cc: libvir-list redhat com
Subject: Re: [Libvir] More queries

Katti, Vadiraj (STSD-Openview) wrote:
> Hi,
>      I've more quries on libvirt apis:
> 	1. Is there any API in libvirt that gives me the uptime of the

No there isn't, unfortunately.  Best you can do is to tell how much CPU
time a guest has used.

I suspect this information is not available from the Xen hypervisor.  If
it is, then we ought to expose it where possible.

> 	2. Can I know how many physical CPUs are dedicated to a VM or if
> are shared.

Yes you can tell this by using the terribly complicated
'virDomainGetVcpus' function.  Read the manual page _very_ carefully for
this one :-(

virt-top uses this function to display the % used and mapping of VCPUs
to PCPUs in real time, so you might find playing with virt-top and
looking at the code useful:

> 	3. How do I know the logical cpu consumption of the guests( from
> using libvirt obviously).

This is sort of possible.  See this page for discussion and limitations
of the current API:


> 	4. Can get the ip address of each of the guests with any of the

No.  Guests can send out packets from their interface using any IP
address they want.  By convention it's normally set up so that guests
get an IP address from a DHCP server, but that's only a convention, not
required.  Imagine rephrasing the question as "Can I get the IP address
of each machine on my LAN?".


Emerging Technologies, Red Hat - http://et.redhat.com/~rjones/
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod
Street, Windsor, Berkshire, SL4 1TE, United Kingdom.  Registered in
England and Wales under Company Registration No. 03798903

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