[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [RH-BZ #595428] 'virsh list' should output more information 'xm list'

On Thu, Apr 19, 2012 at 10:25 AM, Maxim Sditanov <feniksa rambler ru> wrote:
2012/4/2 Maxim Sditanov <feniksa rambler ru>:
> Is this new feature request still
> https://bugs.gentoo.org/show_bug.cgi?id=366561 actual?
> Because virsh still show not enough information:
> $./virsh -c qemu:///system list --all
>  Id    Name                           State
> ----------------------------------------------------
>  1     "                                running
>  -     winxp                          shut off
> And it will be good idea to show more detailed information or add
> additional flag, something like --detail.
> ./virsh -c qemu:///system list --all --detailed
> Id Name       State        Memory   VCPU     Uptime    CPU   IOPS
> ----------------------------------
> -------------------------------------------------------------
>  1  "            running        768M      2         3hours     5%    12.1
>  -  winxp      shut off        512M      1

I implemented first part of this task - VCPU and CPU load.
I ported from virt-manager CPU load algorithm
(thanks Cole Robinson for help

virt manager update graphic in such way:
It create thread, than it take host CPU ticks (how much cpu time take host)
then every 1 sec it update value and calculate percentage.
But this algorithm is bad in virsh, because virsh give information about
domains imidiatly, without delays and thats why i can't caclulate cpu
(also io and
network usage).

I think it will be good idea if libvirtd will hold information about
resource usage and implement interface for this data via libvirt
And virsh and virt-manager will use
the same functions to get cpu, disk and network usage, host uptime

How do you think?

(disclaimer: I'm not a libvirt contributor, just a consumer.  Do I get to vote? :) )

If statistics collection is implemented directly in libvirtd, how often would libvirtd capture these statistics?  Once per second? 10s, 1m, etc...?

Would the interval be user-configurable (per-VM)?  If so, could this setting be changed on the fly (eg, to a live VM and effective immediately)?

Would the statistics survive a restart of libvirtd?  If so, how would they be persisted (flat text, xml, sqlite database)?

How far back would the stats be kept for?  Would this value be configurable per-VM?

+1.  I would like to get these kind of stats from "virsh list", and very much like to get CPU and IO usage history from libvirtd.  I'm developing a simple web interface for managing QEMU and LXC via libvirt (apache, mod_perl, Sys-Virt, sqlite3, noVnc) for personal use.  I know that libvirt can give CPU and IO usage info, but not historic info suitable for assembling a quick graph.  If libvirtd cannot provide historic info, then I will need to implement a separate daemon to record it, probably by polling libvirtd at synchronous intervals.

side-note: I should put up a web page with screen-shots of my work in progress, and provide access to my source code (personal SVN server).  Does anyone here have an interest in using or examining my little project?

ps- I didn't mean to hijack your thread.  I just wanted to state my desire, as a user of libvirt, to have this functionality (however tenuously defined) in place.

Thank you guys and gals for making libvirt excellent.  I've notice the quality of the feedback given to submitted patches and am impressed.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]