[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"
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
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
# 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
# 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
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'>
<memory unit='KiB'>786432</memory>
<currentMemory unit='KiB'>786432</currentMemory>
<vcpu placement='static'>1</vcpu>
<type arch='x86_64' machine='pc'>hvm</type>
<cmdline>nohz=off highres=off ses=cs1 hw=VMware fews= if=eth0 mod                                                                             e=initial</cmdline>
<boot dev='hd'/>
<bootmenu enable='yes'/>
<clock offset='utc'/>
<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'/>
<controller type='ide' index='0'>
<alias name='ide0'/>
<interface type='network'>
<mac address='00:50:56:00:00:01'/>
<source network='internal'/>
<target dev='vnet0'/>
<model type='e1000'/>
<alias name='net0'/>
<interface type='network'>
<source network='external'/>
<target dev='vnet1'/>
<model type='e1000'/>
<alias name='net1'/>
<serial type='pty'>
<source path='/dev/pts/1'/>
<target port='0'/>
<alias name='serial0'/>
<console type='pty' tty='/dev/pts/1'>
<source path='/dev/pts/1'/>
<target type='serial' port='0'/>
<alias name='serial0'/>
<graphics type='vnc' port='5900' autoport='yes'/>
<model type='cirrus' vram='9216' heads='1'/>
<alias name='video0'/>
<memballoon model='virtio'>
<alias name='balloon0'/>

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