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

[Xen-users] Monitoring and logging CPU utlization for all domains

To: <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-users] Monitoring and logging CPU utlization for all domains
From: "John Lim" <jlim@xxxxxxxxxxx>
Date: Tue, 29 Sep 2009 11:14:24 +0800
Cc: 'John Lim' <jlim@xxxxxxxxxxx>
Delivery-date: Tue, 29 Sep 2009 05:23:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcpAsvIxpScSwg5fQa6pLRocJBQRqg==

Hi,

 

Here’s a script that I thought might be useful for everyone using Xen.

 

In order to monitor and log CPU utlisation of all domains, I have implemented the following Perl script:

 

  http://phplens.com/xenstat.pl.txt

 

 

 

Example usage:

===========

 

[Domain-0~]# perl xenstat.pl

cpus=2
     54_garuda_0  0.49% cpu usage  3034.56 sec over 3.61 days
    59_gyrfalcon  3.65% cpu usage  5032.13 sec over 0.80 days
        Domain-0  1.56% cpu usage  9746.05 sec over 3.61 days
 
2009-09-29 10:38:12 39  1 37 23
2009-09-29 10:38:17 80  0  7 13
2009-09-29 10:38:22 54  0  4 42
2009-09-29 10:38:28 25  1  3 71

 

Where statistics is:

 
DATE       TIME       GARUDA   GYRFALCON DOM0  IDLE
                       CPU%     CPU%      CPU%  CPU%
 
2009-09-29  10:38:12    39       1         37    23

 

 

 

REST-ful Logging

=============

The other nice feature is that xenstat.pl can generate a URL and if you have wget installed

It will send the URL to a web server:

 

 

[root@server ~]# perl xenstat.pl 10 1  http://192.168.0.1/

 

Which will call the following url once after 10 seconds of monitoring the CPU:

 

http://192.168.0.1/?54_garuda_0=0&59_gyrfalcon=2&Domain%2D0=2&

 

 

 

For more complete documentation, see

 

 http://phplens.com/phpeverywhere/?q=node/view/266

 

 

Regards, John Lim

jlim#natsoft.com

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-users] Monitoring and logging CPU utlization for all domains, John Lim <=