Has anyone written any MRTG scripts for monitoring domain CPU usage? It''s probably pretty simple to do, but there''s not much point re-inventing the wheel. Thanks James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
James Harper wrote:> Has anyone written any MRTG scripts for monitoring domain CPU usage? > > It''s probably pretty simple to do, but there''s not much point > re-inventing the wheel. > > Thanks > > James > >There was a useful little tool for Debian called cfgstoragemaker. I used it for RHEL, but something between RHEL 4 and RHEL 5 changed and the script no longer works with MRTG, and I haven''t been able to reach the author. I no longer have those systems to play with: if someone can debug cfgstoragemaker, that would be very useful for MRTG moving forward. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 James Harper schreef:> Has anyone written any MRTG scripts for monitoring domain CPU usage? > > It''s probably pretty simple to do, but there''s not much point > re-inventing the wheel.There is somthing like XenStats. I''m on the move of writing more rrdtool scripts that get output from XenAPI. Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHRq0eYH1+F2Rqwn0RCrw2AJoDFezLZY4jXVOV/lYhYpeRL5IP5ACgj1yV bnCx4iFXqvNVeh4siwv1D70=2llk -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Nov 23, 2007 at 05:47:38PM +1100, James Harper wrote:> Has anyone written any MRTG scripts for monitoring domain CPU usage?I have written scripts to dump cpu usage to a file, which I then monitor with cacti.> It''s probably pretty simple to do, but there''s not much point > re-inventing the wheel.It''s very simple, so much so that there''s not much point in publishing it: - Periodically (e.g. every 5 minutes) parse the cpu time out of xm list --long. That is a simple counter. MRTG and other monitoring software knows how to turn ever-increasing counters into a rate of increase. - Take the rate of increase in e.g. CPU milliseconds per 5 minutes, and divide that by 300,000 (the number of milliseconds in 5 minutes). That leaves you with percentage CPU use of every domain. Hope that helps. Cheers, Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> > - Take the rate of increase in e.g. CPU milliseconds per 5 minutes, > and divide that by 300,000 (the number of milliseconds in 5 > minutes). That leaves you with percentage CPU use of every > domain. >Do you do any different sums for SMP domains? James _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi James, On Sun, Nov 25, 2007 at 12:32:13PM +1100, James Harper wrote:> > - Take the rate of increase in e.g. CPU milliseconds per 5 minutes, > > and divide that by 300,000 (the number of milliseconds in 5 > > minutes). That leaves you with percentage CPU use of every > > domain. > > > > Do you do any different sums for SMP domains?No as all my domains have only one VCPU. However, it can''t be difficult. Cheers, Andy _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 Andy Smith schreef:> Hi James, > > On Sun, Nov 25, 2007 at 12:32:13PM +1100, James Harper wrote: >>> - Take the rate of increase in e.g. CPU milliseconds per 5 minutes, >>> and divide that by 300,000 (the number of milliseconds in 5 >>> minutes). That leaves you with percentage CPU use of every >>> domain. >>> >> Do you do any different sums for SMP domains? > > No as all my domains have only one VCPU. However, it can''t be > difficult.Statistics say you can just sum the results (hence your total amount of ms cpu time will be never bigger than the maximum amount of cpu time available). I''m going to do the same thing for the XenAPI with ''get_utilisation''. Stefan -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHSNXyYH1+F2Rqwn0RCrEeAJsHodCwQ5hgehNqzI1R678RMJwPmwCfX3QU IYZNrDhlscskVj0N2wajbT0=mmx9 -----END PGP SIGNATURE----- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users