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. Regards, Devi. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Mon, Sep 22, 2008 at 1:51 PM, devi thapa <devi.thapa@gmail.com> 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. >So have you looked into xentop (xm top) and virt-top? Do they have any of the functionality you are looking for? Cheers, Todd> 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. > > Regards, > Devi. > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >-- Todd Deshane http://todddeshane.net check out our book: http://runningxen.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
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@lists.xensource.com http://lists.xensource.com/xen-users
Hi Todd, I think you have misinterpreted the term resources, sorry I could not convey properly. I meant resources like httpd, cups, samba etc the services, which will be start at the start of the virtual machine. I want to monitor these resources. I want to tell you my view, please bear with me, Suppose I write a script which will monitor the resources of virtual machine like suppose for now httpd and samba. Suppose, if any one of the resource fails, I want the entire virtual machine to get shifted to the other node. So, the script written by me, monitors the resources and if any one of the resource fails, it will shutdown the virtual machine. And the rest is my problem, because I have already written an ocf script to monitor the virtual machine. So if the virtual machine is shutdown, it immediate shifts the virtual machine to the other node. Can I go like this? Awaiting your valuable suggestions!! Regards, Devi. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
If I were you I think of this less in terms of virtual machines, and more from a traditional HA consideration. You can use heartbeat and ldirectord to monitor the processes, and fail them over (and the whole vm) over to another server just as you would on physical machines. So no VM specific requirements. devi thapa wrote:> > Hi Todd, > > I think you have misinterpreted the term resources, > sorry I could not convey properly. I meant resources like > httpd, cups, samba etc the services, which will be start at the start > of the virtual machine. > I want to monitor these resources. > > I want to tell you my view, please bear with me, > > Suppose I write a script which will monitor the resources of virtual > machine like suppose for now httpd and samba. > Suppose, if any one of the resource fails, I want the entire virtual > machine to get shifted to the other node. > So, the script written by me, monitors the resources and if any one > of the resource fails, it will shutdown the virtual machine. > And the rest is my problem, because I have already written an ocf > script to monitor the virtual machine. So if the virtual machine is > shutdown, it immediate shifts the virtual machine to the other node. > > Can I go like this? > Awaiting your valuable suggestions!! > > Regards, > Devi. > > ------------------------------------------------------------------------ > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users-- email: paul@airbred.com | msn: paul@airbred.com | gtalk: paul@g.airbred.com | skype: paulkoan : y!: paulxkoan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users