[libvirt-users] virsh "cpu-stats" not working !!!

Eric Blake eblake at redhat.com
Wed Aug 21 19:35:48 UTC 2013


On 08/21/2013 03:55 AM, SHREE DUTH AWASTHI wrote:

[putting your name in ALL CAPS looks like you are shouting]

>>
>> Hi All,
>>
>> Can you please guide us in solving this issue.
>>
>> Version used : libvirt-1.0.6
>> # rpm -qa | egrep  "libvirt|qemu"
>> qemu-kvm-0.14.1-1_WR4.3.x86_64_XXX.x86_64
>> libvirt-1.0.6-1_WR4.3.x86_64_XXX.2.x86_64
>>
>> Problem :
>>
>> # virsh cpu-stats CLA-0
>> error: Failed to retrieve CPU statistics for domain 'CLA-0'
>> *error: internal error error accessing cgroup cpuacct for vcpu*

Are you sure cpuacct was mounted prior to libvirtd starting?

>>
>> Related info :
>>
>> # cat /proc/cgroups
>> #subsys_name    hierarchy       num_cgroups     enabled
>> cpuset                      3                     4                  1
>> ns                             0                    1                  1
>> cpu                           1                    6                  1
>> cpuacct                     7                    3                  1

The fact that it has a rather high hierarchy number (7) makes me think
you mounted it after the fact.


>>
>> We have also found that there is no "*cgroup*" directory created under *
>> "/sys/fs/".* We have tried mounting the same manually using the below
>> commands but we were not successful.

Cgroups are typically mounted by systemd in newer systems, but the fact
that you are trying to mount manually says that you aren't using
systemd.  Libvirt won't mount cgroups; it only uses what was mounted at
the time it was started.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvirt-users/attachments/20130821/5d567b1d/attachment.sig>


More information about the libvirt-users mailing list