[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] monitoring with MRTG

  • To: xen-users@xxxxxxxxxxxxxxxxxxx
  • From: Andy Smith <andy@xxxxxxxxxxxxxx>
  • Date: Fri, 23 Nov 2007 18:50:33 +0000
  • Delivery-date: Sat, 24 Nov 2007 17:21:03 -0800
  • List-id: Xen user discussion <xen-users.lists.xensource.com>
  • Openpgp: id=BF15490B; url=http://strugglers.net/~andy/pubkey.asc

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

Hope that helps.


Attachment: signature.asc
Description: Digital signature

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.