[Libvir] Re; virDomainBlockStats
Daniel P. Berrange
berrange at redhat.com
Thu Jan 17 19:16:56 UTC 2008
On Thu, Jan 17, 2008 at 04:44:31PM +0000, Gareth Bult wrote:
> 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;
> #ifndef XENVBD_MAJOR
> #define XENVBD_MAJOR 3 // <--- I changed this!
> /*#define XENVBD_MAJOR 202*/
> 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?
Can you capture the output of 'xenstore-ls'. The major/minor number is
used to calculate the node in xenstore where we lookup the stats. The
formula we have here has to match the same code in XenD and AFAIK, we
do match, unless Ubuntu has patched/changed XenD code.
|=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=|
|=- Perl modules: http://search.cpan.org/~danberr/ -=|
|=- Projects: http://freshmeat.net/~danielpb/ -=|
|=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=|
More information about the libvir-list