Computers, Science, Technology, Xen Virtualization, Hosting, Photography, The Internet, Geekdom And More

Xguests (final?) released

Posted on | April 4, 2008 | Comments Off

I’ve finally gotten around to properizing the Xen version of my XMLPulse tool. Its been re-named to Xguests and is available for testing. There’s a bunch of changes, I took out almost as much as I added. The biggest change is Dom-0 /proc information is no longer part of the tool, its only for quick and dirty access to information about running guests.

Major changes include:

  • Output formats are now XML, PHP Array, Bash Array, CSV or easy to scrape text
  • Libxenstat is no longer included in the source, we link against whatever version is in the Xen source tree.
  • Help output is easily parsed by help2man if a man page is needed
  • Code generation for BASH arrays now generates a sanity check to help ensure BASH is being used (and arrays are supported).
  • XML syntax shortened and neatened
  • PHP output properized (now declares guests() to be an array())
  • Output generator moved to one single function rather than one function per format
  • Small optimizations and properizations

If your not familiar with the program as its evolved, Xguests gathers information about running Xen guests and displays the information in many easy to parse formats such as XML, PHP, Bash, CSV or easy to scrape text. It is a small utility that makes scripting and automation in Xen deployments a little easier.

PHP scripts can just fetch and include() the output of Xguests rather than going through the work of parsing XML. Bash scripts can just `source’ the output.

I use the tool for quick access to knowing if a guest is running or not in shell scripts that start/stop guests and logging of CPU use per guest over time with PHP/SQLite. There is a lot more that can be dug from Xenstat, the tool is very easy to hack if you need more information reported.

I originally produced it when the Xen API was not implemented, its still useful .. so I thought that I’d bring it up to date and better standards.

You can obtain the source via Mercurial or download a snapshot here.

Be sure to glance at the README for instructions on how to compile it.


Comments are closed.

  • Monkey Plus Typewriter
  • Stack Overflow

  • Me According To Ohloh

  • Meta