On Thu, Jan 17, 2008 at 04:44:31PM +0000, 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? 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. Dan. -- |=- 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 -=| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list