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

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



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
 
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
memory                     2                    3                  1
freezer                       0                    1                  1
net_cls                      0                    1                  1
blkio                          0                    1                  1
 
# cat /proc/mounts | grep cpu
cpu /dev/cgroup_cpu cgroup rw,relatime,cpu 0 0
cpuset /dev/cgroup_cpuset cgroup rw,relatime,cpuset 0 0
cpuacct /dev/cgroup_cpuacct cgroup rw,relatime,cpuacct 0 0
 
# cat /proc/self/cgroup
7:cpuacct:/
3:cpuset:/
2:memory:/
1:cpu:/
 
virsh # vcpucount CLA-0
maximum      config         3
maximum      live           3
current      config         3
current      live           3
 
virsh # vcpuinfo CLA-0
VCPU:           0
CPU:            0
State:          running
CPU time:       5.7s
CPU Affinity:   yyyyyyyy
 
virsh # vcpupin CLA-0 --current
VCPU: CPU Affinity
----------------------------------
   0: 0-7
   1: 0-7
   2: 0-7
 
# cat /dev/cgroup_cpuacct/cpuacct.usage_percpu
532996776861 117928641102 125174572624 167825543709 155234053284 97350309867 122372010702 110640812251
# cat /dev/cgroup_cpuacct/cpuacct.usage
1431288376064
# cat /dev/cgroup_cpuacct/cpuacct.stat
user 12148
system 81469
 
# cat /dev/cgroup_cpuacct/machine/cpuacct.usage_percpu
0 0 0 0 0 0 0 0
# cat /dev/cgroup_cpuacct/machine/cpuacct.usage
0
 
# chkconfig --list | grep cg
cgroups_mount   0:off   1:on    2:on    3:on    4:on    5:on    6:off
 
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.
 
mkdir -p /dev/cgroup_cpuacct
mount -t cgroup -o cpuacct cpuacct /dev/cgroup_cpuacct
 
(or)
 
mkdir -p /sys/fs/cgroup
mount -t cgroup -o cgroup cgroup /sys/fs/cgroup
 
 
Please find the the domain info used for the creation of VM in the attachment. Please let us know, how to proceed futher.

Your inputs would be of great help to us.
 
Thanks and Regards,
Shree Duth Awasthi.

# cat /mnt/backup/CLA.xml
<domain type='kvm' id='13'>
<name>CLA-0</name>
<memory unit='KiB'>786432</memory>
<currentMemory unit='KiB'>786432</currentMemory>
<vcpu placement='static'>1</vcpu>
<os>
<type arch='x86_64' machine='pc'>hvm</type>
<kernel>/tftpboot/cs1/vmlinuz</kernel>
<initrd>/tftpboot/cs1/initrd.img</initrd>
<cmdline>nohz=off highres=off ses=cs1 hw=VMware fews=192.168.255.250 if=eth0 mod                                                                             e=initial</cmdline>
<boot dev='hd'/>
<bootmenu enable='yes'/>
</os>
<features>
<acpi/>
<apic/>
<pae/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>restart</on_crash>
<devices>
<emulator>/usr/local/bin/qemu-system-x86_64</emulator>
<disk type='file' device='disk'>
<driver name='qemu' type='raw'/>
<source file='/root/linux-0.2.img'/>
<target dev='hda' bus='ide'/>
<alias name='ide0-0-0'/>
<address type='drive' controller='0' bus='0' target='0' unit='0'/>
</disk>
<controller type='ide' index='0'>
<alias name='ide0'/>
</controller>
<interface type='network'>
<mac address='00:50:56:00:00:01'/>
<source network='internal'/>
<target dev='vnet0'/>
<model type='e1000'/>
<alias name='net0'/>
</interface>
<interface type='network'>
<source network='external'/>
<target dev='vnet1'/>
<model type='e1000'/>
<alias name='net1'/>
</interface>
<serial type='pty'>
<source path='/dev/pts/1'/>
<target port='0'/>
<alias name='serial0'/>
</serial>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
</console>
<graphics type='vnc' port='5900' autoport='yes'/>
<video>
<model type='cirrus' vram='9216' heads='1'/>
<alias name='video0'/>
</video>
<memballoon model='virtio'>
<alias name='balloon0'/>
</memballoon>
</devices>
</domain>

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