Hi all, I''m going to create a web interface administration tool for xen, but I''m searching for a command helps me to get information about a virtual machine and what it has of resources: (CPU, Hard disks and its size, Memory). Thanks Mohamed Zohny _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-Jun-26 16:46 UTC
RE: [Xen-users] How can get information about a domain
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Mohammad Zohny > Sent: 26 June 2007 17:40 > To: Xen-users@lists.xensource.com > Subject: [Xen-users] How can get information about a domain > > Hi all, > I''m going to create a web interface administration tool for xen, > but I''m searching for a command helps me to get information > about a virtual > machine and what it has of resources: (CPU, Hard disks and > its size, Memory).You can use "xentop" in batch mode as a simple way to gather statistics and information. If you want a more flexible solution, "libxenstat" will offer that. xentop uses libxenstat to get it''s information, so you don''t get "better" information from one or the other - but I think libxenstat offers a few more bits of information, and you can ask for ONLY the informaton you want - also, xentop outputs the information in text-form, so you may need to parse it to get it back into some sort of native format for calculations or such. -- Mats> > Thanks > Mohamed Zohny > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Arie Goldfeld
2007-Jun-26 17:08 UTC
Re: [Xen-users] How can get information about a domain
You can use *virsh dumpxml <domain_name>*, then parse the output with a Perl xml module to extract the tags. On 6/26/07, Mohammad Zohny <mohamad.zohny@gmail.com> wrote:> > Hi all, > I''m going to create a web interface administration tool for xen, > but I''m searching for a command helps me to get information about a > virtual > machine and what it has of resources: (CPU, Hard disks and its size, > Memory). > > Thanks > Mohamed Zohny > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Petersson, Mats
2007-Jun-26 17:13 UTC
RE: [Xen-users] How can get information about a domain
> -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of > Arie Goldfeld > Sent: 26 June 2007 18:09 > To: Mohammad Zohny > Cc: Xen-users@lists.xensource.com > Subject: Re: [Xen-users] How can get information about a domain > > You can use virsh dumpxml <domain_name>, then parse the > output with a Perl xml module to extract the tags.Yes, you could. The only problem with this is that you''d be dependant on a third party tool on top of xen to get the information. Of course, it also adds the benefit of being able to handle qemu and kvm guest - if that''s of any importance. But it''s probably better to use libvirt directly for this purpose - but it depends on what software tools you want to use at the web interface production, I suppose. -- Mats> > > On 6/26/07, Mohammad Zohny <mohamad.zohny@gmail.com> wrote: > > Hi all, > I''m going to create a web interface administration tool for xen, > but I''m searching for a command helps me to get > information about a virtual > machine and what it has of resources: (CPU, Hard disks > and its size, Memory). > > Thanks > Mohamed Zohny > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > <mailto:Xen-users@lists.xensource.com> > http://lists.xensource.com/xen-users > > > >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Daniel P. Berrange
2007-Jun-26 17:42 UTC
Re: [Xen-users] How can get information about a domain
On Tue, Jun 26, 2007 at 07:13:39PM +0200, Petersson, Mats wrote:> > You can use virsh dumpxml <domain_name>, then parse the > > output with a Perl xml module to extract the tags.That gives you hardware info & resource info. There''s also a specific set of APIs for more efficiently getting resource info on its own if needed, as well as XML describing the capapbilities of the host/hypervisor.> Yes, you could. The only problem with this is that you''d be dependant on > a third party tool on top of xen to get the information.<devils advocate> As opposed to being locked into a specific implementation/vendor''s API ;-) </devils advocate>> Of course, it also adds the benefit of being able to handle qemu and kvm > guest - if that''s of any importance.Well I think it is, since the number of virtualization technologies on Linux (unfortunately?) seems to be increasing over time rather than consolidating - Xen, KVM, QEMU VirtualBox, VMWare, UserModeLinux to name but 6!> But it''s probably better to use libvirt directly for this purpose - but > it depends on what software tools you want to use at the web interface > production, I suppose.Indeed, there are APIs for libvirt in C, python, perl and OCaml, as well as the shell tool. Using the APIs is recommeded since it gives you more control over the process & greater efficiency. Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Mohammad Zohny
2007-Jul-02 08:11 UTC
Re: [Xen-users] How can get information about a domain
Thanks for all, I used virsh to display cpu , memory information. is there any other method to display network interfaces and belong to which bridge, and also display hard disks and their sizes? On 6/26/07, Daniel P. Berrange <berrange@redhat.com> wrote:> > On Tue, Jun 26, 2007 at 07:13:39PM +0200, Petersson, Mats wrote: > > > You can use virsh dumpxml <domain_name>, then parse the > > > output with a Perl xml module to extract the tags. > > That gives you hardware info & resource info. There''s also a specific set > of APIs for more efficiently getting resource info on its own if needed, > as well as XML describing the capapbilities of the host/hypervisor. > > > Yes, you could. The only problem with this is that you''d be dependant on > > a third party tool on top of xen to get the information. > > <devils advocate> > As opposed to being locked into a specific implementation/vendor''s API ;-) > </devils advocate> > > > Of course, it also adds the benefit of being able to handle qemu and kvm > > guest - if that''s of any importance. > > Well I think it is, since the number of virtualization technologies on > Linux (unfortunately?) seems to be increasing over time rather than > consolidating - Xen, KVM, QEMU VirtualBox, VMWare, UserModeLinux to name > but 6! > > > But it''s probably better to use libvirt directly for this purpose - but > > it depends on what software tools you want to use at the web interface > > production, I suppose. > > Indeed, there are APIs for libvirt in C, python, perl and OCaml, as well > as the shell tool. Using the APIs is recommeded since it gives you more > control over the process & greater efficiency. > > Dan. > -- > |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 > -=| > |=- Perl modules: http://search.cpan.org/~danberr/ > -=| > |=- Projects: http://freshmeat.net/~danielpb/ > -=| > |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B > 9505 -=| >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users