Hello, I''m trying to get the load (average load or CPU usage) of each domU in order to script a load balancing solution.... how can I retrieve this information from a text command or from an interface structure ? The only thing that seems to work is the ''xm-top'' command, with the cpu percentile, which is curses based and so this is quite hard to parse... Thanks a lot, Ugo PARSI _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ugo PARSI schrieb:> Hello, > > I''m trying to get the load (average load or CPU usage) of each domU in > order to script a load balancing solution.... how can I retrieve this > information from a text command or from an interface structure ? > > The only thing that seems to work is the ''xm-top'' command, with the > cpu percentile, which is curses based and so this is quite hard to > parse... >Hi Ugo, what about using nagios (www.nagios.com) for retrieving this and other information? nagios uses agents - you could install an agent on each domU and then query the nagios server in dom0... Greetz, Andrej _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Ugo PARSI schrieb:> Hello, > > I''m trying to get the load (average load or CPU usage) of each domU in > order to script a load balancing solution.... how can I retrieve this > information from a text command or from an interface structure ? > > The only thing that seems to work is the ''xm-top'' command, with the > cpu percentile, which is curses based and so this is quite hard to > parse... >Hello ! I''ve two suggestions: try "vmstat" on the commandline of each domU or you could use a ready build tool to monitor: http://ganglia.sourceforge.net/ This needs a small agent on any domU and collects a lot information about your domU''s. -- __________________________________________________ Ralf Schenk fon (02 41) 9 91 21-0 fax (02 41) 9 91 21-59 rs@databay.de Databay AG Hüttenstraße 7 D-52068 Aachen www.databay.de Sitz/Amtsgericht Aachen HRB:8437 USt-IdNr.: DE 210844202 Databay - einfach machen. _________________________________________________ Diese E-Mail und etwa angehängte Dateien enthalten vertrauliche Informationen und sind ausschließlich für den Adressaten bestimmt. Sollten Sie irrtümlich diese E-Mail erhalten haben, bitten wir Sie, uns darüber unter info@databay.de zu informieren und die E-Mail aus Ihrem System zu löschen. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify info@databay.de. If you are not the named recipient, you should return this message and delete it from your system. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> what about using nagios (www.nagios.com) for retrieving this and other > information? nagios uses agents - you could install an agent on each > domU and then query the nagios server in dom0... >Thanks, but I can''t, simply because I cannot trust the domU, otherwise I could have scripted a simple script for the domU reporting to the dom0 :( It''s getting boring, it''s been like 3 hours that I am looking for that feature :( _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> I''m trying to get the load (average load or CPU usage) of each domU in > order to script a load balancing solution.... how can I retrieve this > information from a text command or from an interface structure ? > > The only thing that seems to work is the ''xm-top'' command, with the > cpu percentile, which is curses based and so this is quite hard to > parse...Easiest is to ssh to the guest and run "free" or "vmstat", or you can install a network monitor tool. Bear in mind that even though you can''t trust a guest in general to report usage stats, you equally can''t trust a guest not to just fake high activity (by doing loads of random disk IO / allocing loads of memory) and causing even trusted tools to report that the guest needs more space. You just can''t tell if what the guest is doing is genuinely useful work. It''s probably sensible to trust reports from the guest, at least initially, but have some limits on auto-ballooning to limit starvation to other guests until the admin checks up on what''s happening. HTH, Mark -- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Use "xm list --long" It wont give you cpu average, but cpu time. Messure again (sometime later) and do the maths yourself. (Current load will anyway not be too good for load balancing - everytime a special job runs, that needs more computing power for only a few seconds, you would move that VM...) Regards, Steffen> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Ugo PARSI > Sent: Monday, March 27, 2006 4:43 PM > To: xen-users@lists.xensource.com > Subject: [Xen-users] Retrieving the load of each domU > > Hello, > > I''m trying to get the load (average load or CPU usage) of > each domU in order to script a load balancing solution.... > how can I retrieve this information from a text command or > from an interface structure ? > > The only thing that seems to work is the ''xm-top'' command, > with the cpu percentile, which is curses based and so this is > quite hard to parse... > > Thanks a lot, > > Ugo PARSI > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Also, using libxenstat (there used to be Python bindings, but I don''t know if there are, now) will give you stats without parsing xentop output. Or you can calculate CPU usage directly in Python from values retrieved from Xen. Cheers, Mark On Monday 27 March 2006 17:44, Steffen Heil wrote:> Hi > > Use "xm list --long" > It wont give you cpu average, but cpu time. > Messure again (sometime later) and do the maths yourself. > (Current load will anyway not be too good for load balancing - everytime a > special job runs, that needs more computing power for only a few seconds, > you would move that VM...) > > Regards, > Steffen > > > -----Original Message----- > > From: xen-users-bounces@lists.xensource.com > > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Ugo PARSI > > Sent: Monday, March 27, 2006 4:43 PM > > To: xen-users@lists.xensource.com > > Subject: [Xen-users] Retrieving the load of each domU > > > > Hello, > > > > I''m trying to get the load (average load or CPU usage) of > > each domU in order to script a load balancing solution.... > > how can I retrieve this information from a text command or > > from an interface structure ? > > > > The only thing that seems to work is the ''xm-top'' command, > > with the cpu percentile, which is curses based and so this is > > quite hard to parse... > > > > Thanks a lot, > > > > Ugo PARSI > > > > _______________________________________________ > > Xen-users mailing list > > Xen-users@lists.xensource.com > > http://lists.xensource.com/xen-users-- Dave: Just a question. What use is a unicyle with no seat? And no pedals! Mark: To answer a question with a question: What use is a skateboard? Dave: Skateboards have wheels. Mark: My wheel has a wheel! _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hello, Steffen Heil wrote:> Hi > > Use "xm list --long" > It wont give you cpu average, but cpu time. > Messure again (sometime later) and do the maths yourself.The scripts at http://skaya.enix.org/wiki/XenStats do just that. It works beautifully! Regards, Thomas _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users