WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] monitoring with MRTG

To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] monitoring with MRTG
From: Andy Smith <andy@xxxxxxxxxxxxxx>
Date: Fri, 23 Nov 2007 18:50:33 +0000
Delivery-date: Sat, 24 Nov 2007 17:21:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <AEC6C66638C05B468B556EA548C1A77D0131A1AD@trantor>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Openpgp: id=BF15490B; url=http://strugglers.net/~andy/pubkey.asc
References: <AEC6C66638C05B468B556EA548C1A77D0131A1AD@trantor>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.13 (2006-08-11)
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

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>