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

Re: [Xen-devel] Getting VM stats

  • To: jdsw <jdsw2002@xxxxxxxxx>
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On 12/13/06, jdsw <jdsw2002@xxxxxxxxx> wrote:

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.


Xen-devel mailing list



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