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-devel

Re: [Xen-devel] Getting VM stats

To: jdsw <jdsw2002@xxxxxxxxx>
Subject: Re: [Xen-devel] Getting VM stats
From: "Tim Wood" <twwood@xxxxxxxxx>
Date: Wed, 13 Dec 2006 19:53:13 -0500
Cc: xendevel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 13 Dec 2006 16:53:08 -0800
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=fF9FeE3w9I91xgWuonuIMncKduoO7iHLiHKBx/+tyY6U8Oool4E4EeZ6MbgW2WG8QGAjMXNRNmE+mpqrzjhaCnLo/LV5fyfbMlUiF4vaTMvKqElgKbH5AcVI7qrtFjtPix/oai/UF0XGpl83AKcA9cXY7k6/CDhYwr/gAq+RWww=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <751403.75036.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <751403.75036.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 12/13/06, jdsw <jdsw2002@xxxxxxxxx> wrote:
Hi

Q.   What is recommended way of getting the following virtual machine stats
for running domain, programmatically (python preferably)?

 Memory used %, CPU %, Disk I/O , Network I/O

IF you are trying to gather all of this information from domain 0:

In the past, I've found it easiest to get CPU statistics by modifying
XenMon (it is written in python).  Xenmon gives more detailed
information than xentop, so I *assume* it is more accurate.  Xenmon
claims 1-2% performance overhead, I haven't heard what xentop incurs,
but I wouldn't be surprised if it is a bit more efficient.

Network stats I ended gathering with traditional dom0 tools like
parsing /proc/net/dev.

Getting disk stats can be more difficult - if you are using file
backed VBDs there were some patches a while ago that would let you
output statistics for them (I'm not certain if this has been brought
into mainstream xen since then).  Memory information (beyond just
knowing how much has been allocated to each VM) is quite difficult to
get from dom0.


IF you are willing to run things inside your VMs, then it may be
easier to use existing tools for monitoring memory and disk usage.
You shouldn't monitor CPU usage from inside a VM though since that is
unlikely to be very accurate.

-Tim

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>