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

Re: [libvirt-users] Issue with getCPUStats and getMemoryStats



On 2012年07月10日 15:07, Ananth wrote:
Hi,

I am facing issue with the calls getCPUStats and getMemoryStats. Please
find the error below.

AttributeError: 'module' object has no attribute
'VIR_NODE_CPU_STATS_ALL_CPUS'
 >>> print con.getCPUStats(2, None, 0, 0)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2173, in
getCPUStats
     ret = libvirtmod.virNodeGetCPUStats(self._o, cpuNum, params,
nparams, flags)
*AttributeError: 'module' object has no attribute 'virNodeGetCPUStats'*

 >>> print con.getMemoryStats(2, None, 0, 0)
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2245, in
getMemoryStats
     ret = libvirtmod.virNodeGetMemoryStats(self._o, cellNum, params,
nparams, flags)
*AttributeError: 'module' object has no attribute 'virNodeGetMemoryStats'*


Kind let me know if this is a known issue. I came to know that this
issue was fixed in 0.9.8 version of libvirt. I am executing these calls
on libvirt-0.9.8 compiled (--with-netcf) on centos 6.2.
Please let me know if any other option needs to be specified while
compiling libvirt in order to get this working.


Well, from your previous mail, you compiled libvirt with
"--prefix=/opt/libvirt", so apprently you don't use the
right module:

> Traceback (most recent call last):
>    File "<stdin>", line 1, in <module>
>    File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2173, in
> getCPUStats

It's the same reason for you can't see any VMs listed with
"virsh list --all", your libvirtd looks up the domains config
from /opt/libvirt/etc/libvirt, and there is no vm configs there.

I don't known why you want to install to /opt/prefix, but
to make things easy enough, why not:

./autogen.sh --system && make install

Regards,
Osier




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