<br><br><div class="gmail_quote">On Thu, Apr 19, 2012 at 10:25 AM, Maxim Sditanov <span dir="ltr"><<a href="mailto:feniksa@rambler.ru">feniksa@rambler.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/4/2 Maxim Sditanov <<a href="mailto:feniksa@rambler.ru">feniksa@rambler.ru</a>>:<br>
> Is this new feature request still<br>
> <a href="https://bugs.gentoo.org/show_bug.cgi?id=366561" target="_blank">https://bugs.gentoo.org/show_bug.cgi?id=366561</a> actual?<br>
><br>
> Because virsh still show not enough information:<br>
><br>
> $./virsh -c qemu:///system list --all<br>
><br>
>  Id    Name                           State<br>
> ----------------------------------------------------<br>
>  1     "                                running<br>
>  -     winxp                          shut off<br>
><br>
> And it will be good idea to show more detailed information or add<br>
> additional flag, something like --detail.<br>
> ./virsh -c qemu:///system list --all --detailed<br>
><br>
><br>
> Id Name       State        Memory   VCPU     Uptime    CPU   IOPS<br>
> ----------------------------------<br>
> -------------------------------------------------------------<br>
>  1  "            running        768M      2         3hours     5%    12.1<br>
>  -  winxp      shut off        512M      1<br>
><br>
<br>
I implemented first part of this task - VCPU and CPU load.<br>
I ported from virt-manager CPU load algorithm<br>
(thanks Cole Robinson for help<br>
<a href="https://www.redhat.com/archives/virt-tools-list/2012-April/msg00051.html" target="_blank">https://www.redhat.com/archives/virt-tools-list/2012-April/msg00051.html</a>)<br>
<br>
virt manager update graphic in such way:<br>
It create thread, than it take host CPU ticks (how much cpu time take host)<br>
then every 1 sec it update value and calculate percentage.<br>
But this algorithm is bad in virsh, because virsh give information about<br>
domains imidiatly, without delays and thats why i can't caclulate cpu<br>
(also io and<br>
network usage).<br>
<br>
I think it will be good idea if libvirtd will hold information about<br>
resource usage and implement interface for this data via libvirt<br>
And virsh and virt-manager will use<br>
the same functions to get cpu, disk and network usage, host uptime<br>
<br>
How do you think?<br></blockquote></div><br>(disclaimer: I'm not a libvirt contributor, just a consumer.  Do I get to vote? :) )<br><br>If statistics collection is implemented directly in libvirtd, how often would libvirtd capture these statistics?  Once per second? 10s, 1m, etc...?<br>
<br>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)?<br><br>Would the statistics survive a restart of libvirtd?  If so, how would they be persisted (flat text, xml, sqlite database)?<br>
<br>How far back would the stats be kept for?  Would this value be configurable per-VM?<br><br>+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.<br>
<br>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?<br>
<br>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.<br><br>Thank you guys and gals for making libvirt excellent.  I've notice the quality of the feedback given to submitted patches and am impressed.<br>