Just curious, is there currently any way to get info on current CPU usage for individual domains (besides installing an snmp agent in each domain) in a format that could be easily fed into mrtg/rrdtool? It''d be nice to know what VM''s are using the CPU the most. ------------------------------------------------------------------------ | nate carlson | natecars@natecarlson.com | http://www.natecarlson.com | | depriving some poor village of its idiot since 1981 | ------------------------------------------------------------------------ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Am Montag, den 11.04.2005, 17:54 -0500 schrieb Nate Carlson:> Just curious, is there currently any way to get info on current CPU usage > for individual domains (besides installing an snmp agent in each domain) > in a format that could be easily fed into mrtg/rrdtool? > > It''d be nice to know what VM''s are using the CPU the most.Won''t get a price for elegance, but what about polling the "Time(s)" column in "xm list" every few seconds /usr/sbin/xm list | grep "^$domname" | gawk ''{ print $6 }'' and calculating the differences? *duck & cover* /nils. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
It should be relatively easy to write a script that parses "xm list" output and gives it to MRTG, the output of such script is documented somewhere in MRTG docs. I have a script that parses iptables output and gives it to MRTG and that way you have traffic graph of all VMs on dom0 whithout snmp. If somebody is intrested I can send it, but it relies that you have some config files in my own format. Anton Titov Nate Carlson wrote:> Just curious, is there currently any way to get info on current CPU > usage for individual domains (besides installing an snmp agent in each > domain) in a format that could be easily fed into mrtg/rrdtool? > > It''d be nice to know what VM''s are using the CPU the most. > > ------------------------------------------------------------------------ > | nate carlson | natecars@natecarlson.com | http://www.natecarlson.com | > | depriving some poor village of its idiot since 1981 | > ------------------------------------------------------------------------ > > _______________________________________________ > 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
On Tue, 12 Apr 2005, Nils Toedtmann wrote:> Won''t get a price for elegance, but what about polling the "Time(s)" > column in "xm list" every few seconds > > /usr/sbin/xm list | grep "^$domname" | gawk ''{ print $6 }'' > > and calculating the differences?True enough! Something elegant (and accessible via SNMP) would be nice, but this would certainly work. I''ll have to look at hacking that up.. :) Thanks! Forgot that ''xm list'' included CPU time, too. Heh. :) On another note, anyone have any ideas of calculating something like the ''load average'' of Xen itself (so you can know if you''re pegging the CPU on the box constantly)? As far as I know, the xm command doesn''t give anything helpful in that regard. ------------------------------------------------------------------------ | nate carlson | natecars@natecarlson.com | http://www.natecarlson.com | | depriving some poor village of its idiot since 1981 | ------------------------------------------------------------------------ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
What about comparing sums of xm list dom''s times to wallclock time for short enough periods? If times sum up to wallclock time, you have load average of 1, which is maximum. Not exactly the Linux load average, but it is something. Nate Carlson wrote:> > On another note, anyone have any ideas of calculating something like > the ''load average'' of Xen itself (so you can know if you''re pegging > the CPU on the box constantly)? As far as I know, the xm command > doesn''t give anything helpful in that regard. > > ------------------------------------------------------------------------ > | nate carlson | natecars@natecarlson.com | http://www.natecarlson.com | > | depriving some poor village of its idiot since 1981 | > ------------------------------------------------------------------------ > > _______________________________________________ > 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
Nate Carlson wrote:> Just curious, is there currently any way to get info on current CPU > usage for individual domains (besides installing an snmp agent in each > domain) in a format that could be easily fed into mrtg/rrdtool? > > It''d be nice to know what VM''s are using the CPU the most.In the latest version of VM-Tools (http://www.cs.utexas.edu/users/aliguori/vm-tools-latest.tar.gz) there''s a utility called vm-top that will display (in the console) the current CPU usage, for each domain, on each CPU. It''s only displays current stats, it does not (yet) save those states over a long period of time. Regards, Anthony Liguori> ------------------------------------------------------------------------ > | nate carlson | natecars@natecarlson.com | http://www.natecarlson.com | > | depriving some poor village of its idiot since 1981 | > ------------------------------------------------------------------------ > > _______________________________________________ > 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
On Tue, 12 Apr 2005, Anton Titov wrote:> What about comparing sums of xm list dom''s times to wallclock time for > short enough periods? If times sum up to wallclock time, you have load > average of 1, which is maximum. Not exactly the Linux load average, but > it is something.Hrm, yeah, it''d be something, at least. Take a lot of scripting, but should be doable. :) ------------------------------------------------------------------------ | nate carlson | natecars@natecarlson.com | http://www.natecarlson.com | | depriving some poor village of its idiot since 1981 | ------------------------------------------------------------------------ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, 11 Apr 2005, Anthony Liguori wrote:> In the latest version of VM-Tools > (http://www.cs.utexas.edu/users/aliguori/vm-tools-latest.tar.gz) there''s > a utility called vm-top that will display (in the console) the current > CPU usage, for each domain, on each CPU. > > It''s only displays current stats, it does not (yet) save those states > over a long period of time.Ah - neat! If there''s an easy way to dump these numbers out to an easily parsable format (I haven''t built + tried it yet), that would be excellent. ------------------------------------------------------------------------ | nate carlson | natecars@natecarlson.com | http://www.natecarlson.com | | depriving some poor village of its idiot since 1981 | ------------------------------------------------------------------------ _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users