<div>Hi Daniel,</div>
<div> </div>
<div>Thanks a lot for your reply. </div>
<div> </div>
<div>We have mounted all the cgoup controllers at  "/dev/cgroup_<controller>" as mentioned below.<br><font color="#993300" face="courier new,monospace">ls /dev/ | grep cgroup<br>cgroup_cpu    cgroup_cpuacct       cgroup_cpuset         cgroup_mem</font></div>

<div> </div>
<div>On further debugging we dound that the "VCPU" directories are not being created for our domains and hence the comamnd "cpu-stats <domain>" is failing.</div>
<div>Below is the snippet of logs collected with debug logs enabled for libvirt.</div>
<div> </div>
<div><font style="BACKGROUND-COLOR:#ffffff" color="#ff0000" face="courier new,monospace">2013-08-21 15:03:35.162+0000: 1273: error : virCgroupMakeGroup:708 : Make group /machine/anusha.libvirt-qemu/vcpu0<br>2013-08-21 15:03:35.162+0000: 1273: error : virCgroupMakeGroup:729 : Makecontroller /dev/cgroup_cpu/machine/anusha.libvirt-qemu/vcpu0/<br>
2013-08-21 15:03:35.162+0000: 1273: error : virCgroupMakeGroup:745 : Failed to create controller cpu for group</font></div>
<p><font style="BACKGROUND-COLOR:#ffffff" face="courier new,monospace">Where anusha --> is the domain which was created for libvirt.</font></p>
<div> Can you please let us know if it is enough to mount the controllers mentioned above or we have missed mounting of any other controller. Your inputs would be of great help to us. Thanking you in advance. </div>
<div> </div>
<div>BR</div>
<div>Abhinay</div>
<div class="gmail_quote">On Wed, Aug 21, 2013 at 1:39 PM, Daniel P. Berrange <span dir="ltr"><<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">
<div class="im">On Wed, Aug 21, 2013 at 09:06:21AM +0200, arun abhinay wrote:<br>> Hi,<br>><br>> We have upgraded the libvirt version from libvirt-1.0.5 to libvirt-1.0.6-1<br>> on our linux machine. After this upgrade "virsh cpu-stats <domain>" command<br>
> is not working on our HardWare.<br>><br></div>> *virsh # cpu-stats test<br>
<div class="im">> error: Failed to retrieve CPU statistics for domain 'test'<br></div>> error: internal error error accessing cgroup cpuacct for vcpu*<br>> **<br>> *# cat /proc/cgroups<br>
<div class="im">> #subsys_name    hierarchy       num_cgroups     enabled<br>> cpuset  3       4       1<br>> ns      0       1       1<br>> cpu     1       6       1<br>> cpuacct 7       3       1<br>> memory  2       3       1<br>
> freezer 0       1       1<br>> net_cls 0       1       1<br>> blkio   0       1       1<br></div>> *<br>> *# chkconfig --list | grep cg<br>> cgroups_mount   0:off   1:on    2:on    3:on    4:on    5:on    6:off*<br>

<div class="im">><br>> We have also found that there is no "cgroup" directory created by<br>> kenel under "/sys/fs/".  We suspect that the 'cgroup' controllers are not<br>> mounted properly and hence the issue is observed. While using the<br>
> libvirt-1.0.5 version below mentioned mount commands were sufficient to<br>> mount cgroup controllers<br>><br></div>> *mkdir -p /dev/cgroup_cpuacct<br>> mount -t cgroup -o cpuacct cpuacct /dev/cgroup_cpuacct*<br>

<div class="im">><br>> As cgroups hieracrhy inside libvirtd has changed in libvirt-1.0.6-1, we<br><br></div>Actually it changed in version 1.0.5<br>
<div class="im"><br>> feel that the above commands are now not sufficient. We feel we have to do<br>> some more steps get the 'cgroups' mounted properly on our hardware.<br>><br>> Since we are new to libvirt and can you please help us by providing some<br>
> pointers to fix the above issue and get cpu-stats working on our HardWare.<br>> Since we have to fix this on top priority, can you please reply as soon as<br>> possible. Please let us know if you need any further information from our<br>
> side.<br><br></div>Libvirt will never attempt to mount any cgroups controllers. It delegates<br>this task to the base OS. Historically the 'cgconfig' init script would<br>be used. On distros which use systemd though, systemd will take care of<br>
this task. There's a bit more info here<br><br>  <a href="http://libvirt.org/cgroups.html" target="_blank">http://libvirt.org/cgroups.html</a><br><br>Basically our recommendation is to mount all the controllers individually<br>
at /sys/fs/cgroup/<controllername><br><br>Regards,<br>Daniel<br><span class="HOEnZb"><font color="#888888">--<br>|: <a href="http://berrange.com/" target="_blank">http://berrange.com</a>      -o-    <a href="http://www.flickr.com/photos/dberrange/" target="_blank">http://www.flickr.com/photos/dberrange/</a> :|<br>
|: <a href="http://libvirt.org/" target="_blank">http://libvirt.org</a>              -o-             <a href="http://virt-manager.org/" target="_blank">http://virt-manager.org</a> :|<br>|: <a href="http://autobuild.org/" target="_blank">http://autobuild.org</a>       -o-         <a href="http://search.cpan.org/~danberr/" target="_blank">http://search.cpan.org/~danberr/</a> :|<br>
|: <a href="http://entangle-photo.org/" target="_blank">http://entangle-photo.org</a>       -o-       <a href="http://live.gnome.org/gtk-vnc" target="_blank">http://live.gnome.org/gtk-vnc</a> :|<br></font></span></blockquote>
</div><br>