Getting VM stats
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
Q. Is there a good reason to have xentop and xenbaked/xenmon both? Do they offer different information ? Or Is one more efficient than other ?
Q. why is this information not available in through the Xend, Is it planned ? All tools can then use this information consistently without worrying about memory maps, xc or xs details.
Thanks
/Jd
---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 6 lines · jdsw
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