[Libvir] Re; virDomainBlockStats

Richard W.M. Jones rjones at redhat.com
Thu Jan 17 17:39:25 UTC 2008


Gareth Bult wrote:
> Hi,
> 
> I've a number of servers running XEN and am trying to write some code to 
> monitor them through libvirt.
> (Xeon/Dual Core/Ubuntu Gutsy/Xen 3.1)
> 
> All was going well until I got to virDomainBlockStats and it simply 
> refused to accept my coding ..
> 
> My solution (the code now works) is to change the following;
> 
> src/stats_linux.c:
> 
> #ifndef XENVBD_MAJOR
> #define XENVBD_MAJOR 3  //  <--- I changed this!
> /*#define XENVBD_MAJOR 202*/
> #endif
> 
> device = XENVBD_MAJOR * 256 + 1 + minor /* * 16 */;  <-- this too!
> 
> It now seems to give me some meaningful numbers without feeding my any 
> error messages.
> Can anyone tell me "why" I needed to do this?
> 
> I'm using "xvda" as the device path .. tried every other device name I 
> could think of with out any good results ...

Gareth,

What does it print when you do:

   ls -l /dev/xvda*

from within the guest?

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/20080117/d337de71/attachment-0001.bin>


More information about the libvir-list mailing list