[Libvir] More queries

Richard W.M. Jones rjones at redhat.com
Mon Dec 17 12:16:38 UTC 2007


Katti, Vadiraj (STSD-Openview) wrote:
> "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.

Indeed it does.  Apparently xend returns a 'start_time' field for a 
domain, which is the start time as a Unix time_t.  'xm uptime' just 
prints out the current time minus this start time.

One problem seems to be that this is saved in the image across reboots, 
so presumably it's fairly meaningless if the host machine was switched 
off for a signficant length of time.

Rich.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20071217/a6eb9068/attachment-0001.bin>


More information about the libvir-list mailing list