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

Re: [Xen-users] Process ids

On Mon, 2008-09-22 at 19:21 +0530, devi thapa wrote:
> Hi all,
> 
> I want to check the status of resources of virtual machine, created
> using Xen.
> I have written a script, which checks the status of the virtual
> machines and does all the actions like,
> start, stop, status, monitor.
> so, I want to check the status of the resource of virtual machines.
> 
> I have thought of it and have 3 ideas.  I want your suggestions.
> 
> 1.  Since we will know the process id of virtual machine, can we get
> the id of the resources present in the virtual machine like apache.
> 2.  There are python scripts to create, stop etc the virtual machine,
> Can I enhance the scripts to monitor its resources as well.
> 3.   or Can we achieve through xen bus.
> 
> Awaiting your valuable suggestions.

It looks like you need two kinds of information. One containing stuff
that dom-0 knows about the running guests , the other being vitals
within the guest.

I have something I wrote called XGuests (or xmlpulse) which uses the
same library as xentop (libxenstat). It will print interesting things
about the guests in various formats that are easy to read by other
programs such as:

PHP array format
Perl 
BASH array format
XML
CSV
Raw text (but easy to scrape)

You should be able to easily hack it to print everything that xentop
would give you. The URL to the mercurial repo is
http://echoreply.us/hg/xmlpulse.hg

As this needs to link against the libxenstat that your version of Xen is
using, you will need to build against the xen source. Check the README.
Oddly, libxenstat never made its way to becoming a dso (afaik), or I'd
just link against whatever was there.

For the second bit that you need, you will have to have some agent
running on each guest that gives you a summary, or a dump of vitals from
procfs.

Cheers,
--Tim





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

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