[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] "right" way to gather domU stats in xen 3 & 4?
On Sat, 26 Feb 2011, Florian Heigl wrote: > Hi all, > > I'm building a xen agent for nagios / check_mk. > Automatic inventory of VMs and the basic up / down reporting are > reliable now, and I'm looking at the next items on my list. it looks like a interesting and useful project > * Free memory. This seems easy at first, look at xm info and that's > mostly it. I can have a different color for memory allocated to dom0 > minus the dom0 lower balloon limit, but I'll also have a check that > will go to full alarm if anyone is crazy enough to use dom0 balloning. > ;) > What I don't know is if I also need to substract something for the > Xen heap? Long ago it used to default to 32MB i think. Can someone > clue me in about that - is it relevant to xm info free / total mem? libxenlight provides a function that is called libxl_get_free_memory that returns the amount of free memory in the system. You can call it directly (adding a libxenlight dependency to your code) or you could simply give a look at the implementation (tools/libxl/libxl.c:libxl_get_free_memory). Also on hosts managed by libxenlight there is an additional xenstore node called /local/domain/0/memory/freemem-slack that contains the amount of memory that is going to be left free for Xen. In case you are wondering xen 4.1 is going to ship with two toolstacks: the old xend and a new one that is a library called libxenlight plus a minimal C utility called xl to invoke the library functions. xl/libxenlight are recommended over xend. > * per domU I also wanna look at memory statistics. > - one thing is: mem vs. mem-max to show balloning. > - the other thing is tmem: i don't know if i should spend the time > getting it right as I start getting the impression that since it was > added by Dan and now tmem2 was added, two-and-a-half years went down > where it's considered working implemented none bothers to make it work > for everyone. i.e. the recent directed that the direct ballooning > daemon was just a lab exercise ;) If you know of any people that > successfully run xen with tmem2 and such, I'd love to work with them > to build the nagios-sy statistics .Otherwise I'll save myself the > headaches. > > * per domU cpu percent (to show how much of the dom0 power the vm is > consuming)... > > > Speed issues: > Usually checks in check_mk are fired off every minute, so it would be > good if I can directly via xenstore to collect and report my data > within 1-2 seconds or less. Speed seems to be an issue I have to worry > about - on my "top of the shelf" xen host it will take around > 0.6seconds to query a meager 5 VMs. > That's just a 1.5GHz VIA box, but I'll have to see how long it takes > for 100 VMs or more. Xenstore can become very busy on systems with many VMs running. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |