views:

1040

answers:

4

I'd like to view historical data for guest cpu/memory/IO usage, rather than just current usage.

+1  A: 

Xentop is a tool to monitor the domains (VMs) running under Xen. VMware's ESX has a similar tool (I believe its called esxtop).

The problem is that you'd like to see the historical CPU/Mem usage for domains on your Xen system, correct?

As with all Virtualization layers, there are two views of this information relevant to admins: the burden imposed by the domain on the host and the what the domain thinks is its process load. If the domain thinks it is running low on resources but the host is not, it is easy to allocate more resources to the domain from the host. If the host runs out of resources, you'll need to optimize or turn off some of the domains.

Unfortunately, I don't know of any free tools to do this. XenSource provides a rich XML-RPC API to control and monitor their systems. You could easily build something from that.

If you only care about the domain-view of its own resources, I'm sure there are plenty of monitoring tools already available that fit your need.

As a disclaimer, I should mention that the company I work for, Leostream, builds virtualization management software. Unfortunately, it does not really do utilization monitoring.

Hope this helps.

jjohn
+1  A: 

Try Nagios, or Munin.

gbjbaanb
Ended up using Munin.
Otto
A: 

Both Nagios and Munin seem to have plugins/support for Xen data collection.

A Xen Virtual Machine Monitor Plugin for Nagios

munin plugins

Otto
+2  A: 

There is a perl program i have written that does this. See link text It also supports logging to a URL.

Features:

perl xenstat.pl          -- generate cpu stats every 5 secs
perl xenstat.pl 10       -- generate cpu stats every 10 secs
perl xenstat.pl 5 2      -- generate cpu stats every 5 secs, 2 samples

perl xenstat.pl d 3      -- generate disk stats every 3 secs
perl xenstat.pl n 3      -- generate network stats every 3 secs
perl xenstat.pl a 5      -- generate cpu avail (e.g. cpu idle) stats every 5 secs

perl xenstat.pl 3 1 http://server/log.php    -- gather 3 secs cpu stats and send to URL
perl xenstat.pl d 4 1 http://server/log.php    -- gather 4 secs disk stats and send to URL
perl xenstat.pl n 5 1 http://server/log.php    -- gather 5 secs network stats and send to URL

Sample output:

[server~]# xenstat 5 
cpus=2
       40_falcon   2.67%    2.51 cpu hrs  in 1.96 days ( 2 vcpu,  2048 M)
       52_python   0.24%  747.57 cpu secs in 1.79 days ( 2 vcpu,  1500 M)
     54_garuda_0   0.44% 2252.32 cpu secs in 2.96 days ( 2 vcpu,   750 M)
           Dom-0   2.24%    9.24 cpu hrs  in 8.59 days ( 2 vcpu,   564 M)

                    40_falc 52_pyth 54_garu   Dom-0    Idle
2009-10-02 19:31:20     0.1     0.1    82.5    17.3     0.0 *****
2009-10-02 19:31:25     0.1     0.1    64.0     9.3    26.5 ****
2009-10-02 19:31:30     0.1     0.0    50.0    49.9     0.0 *****
John Lim