<div>Hi Again Eric,</div>
<div> </div>
<div>Sorry for spamming.</div>
<div> </div>
<div>Adding to the below mail. The cgroups are mounted at "/dev" as mentioned below</div>
<div> </div>
<div># ls /dev/ | grep cgroup<br>cgroup_cpu<br>cgroup_cpuacct<br>cgroup_cpuset<br>cgroup_mem</div>
<div> </div>
<div>On a liter note, " On 08/21/2013 03:55 AM, SHREE DUTH AWASTHI wrote: " is coming by default while I try to reply. Anyway, I will explicitly modify it from now.<br><br>Thanks and Regards,</div>
<div>Shree Duth Awasthi.</div>
<div><br> </div>
<div class="gmail_quote">On Fri, Aug 23, 2013 at 9:16 AM, Shree Duth Awasthi <span dir="ltr"><<a href="mailto:shreeduth.awasthi@gmail.com" target="_blank">shreeduth.awasthi@gmail.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>Hi Eric,</div>
<div> </div>
<div>Thanks for your valuable time and comments.</div>
<div class="im">
<div> </div>
<div>>> Are you sure cpuacct was mounted prior to libvirtd starting?<br></div></div>
<div>Yes, we are mounting cpuacct before starting the libvirtd daemon.</div>
<div> </div>
<div>
<div class="im">>> Libvirt won't mount cgroups; <br></div>Yes, Agree. 
<div class="im"><br>>>it only uses what was mounted at the time it was started.</div></div>
<div>But we are mounting it well before it is started.</div>
<div> </div>
<div>We are facing the issue only while executing the "cpu-stats <domain name>" command. </div>
<div> </div>
<div>One more observation is that : While starting the domain, we are observing the below error.</div>
<div> </div>
<div>"2013-08-22 12:45:44.326+0000: 17554: warning : qemuSetupCgroupForVcpu:953 : Unable to get vcpus' pids."</div>
<div> </div>
<div>
<div>This may be the root cause of  virsh cpu-stats not working. ( seems to be because of CPU pinning issue )</div>
<div> </div></div>
<div>Because of this the VCPU directories are not created for the corresponding domain in "/dev/cgroup_<controller>/machine/<domain>.libvirt-qemu/" and hence the "cpu-stats" command is not working. <br>
Please let us know your view on this.</div>
<div><br>We  have collected the debug logs, please find the attachment for the same..<br> </div>
<div class="im HOEnZb">
<div>Thanks and Regards,</div>
<div>Shree Duth Awasthi.<br> </div></div>
<div class="HOEnZb">
<div class="h5">
<div class="gmail_quote">On Wed, Aug 21, 2013 at 9:35 PM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@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">On 08/21/2013 03:55 AM, SHREE DUTH AWASTHI wrote:<br><br>[putting your name in ALL CAPS looks like you are shouting]<br>

<div><br>>><br>>> Hi All,<br>>><br>>> Can you please guide us in solving this issue.<br>>><br>>> Version used : libvirt-1.0.6<br>>> # rpm -qa | egrep  "libvirt|qemu"<br>
>> qemu-kvm-0.14.1-1_WR4.3.x86_64_XXX.x86_64<br>>> libvirt-1.0.6-1_WR4.3.x86_64_XXX.2.x86_64<br>>><br>>> Problem :<br>>><br>>> # virsh cpu-stats CLA-0<br>>> error: Failed to retrieve CPU statistics for domain 'CLA-0'<br>
</div>>> *error: internal error error accessing cgroup cpuacct for vcpu*<br><br>Are you sure cpuacct was mounted prior to libvirtd starting?<br>
<div><br>>><br>>> Related info :<br>>><br>>> # cat /proc/cgroups<br>>> #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>
<br></div>The fact that it has a rather high hierarchy number (7) makes me think<br>you mounted it after the fact.<br><br><br>>><br>>> We have also found that there is no "*cgroup*" directory created under *<br>
>> "/sys/fs/".* We have tried mounting the same manually using the below<br>
<div>>> commands but we were not successful.<br><br></div>Cgroups are typically mounted by systemd in newer systems, but the fact<br>that you are trying to mount manually says that you aren't using<br>systemd.  Libvirt won't mount cgroups; it only uses what was mounted at<br>
the time it was started.<br><span><font color="#888888"><br>--<br>Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" target="_blank" value="+19193013266">+1-919-301-3266</a><br>Libvirt virtualization library <a href="http://libvirt.org/" target="_blank">http://libvirt.org</a><br>
<br></font></span></blockquote></div><br></div></div></blockquote></div><br>