Ask Your Question


asked 2014-04-05 01:57:55 -0500

Kashyap gravatar image


I am using libvirt version 1.0.2.

root@compute1:~# libvirtd --version
libvirtd (libvirt) 1.0.2

when I am trying to getCPUStats as following:

 return int(domain.getCPUStats(True, 0)[0]['cpu_time'])

I am getting following error:

AttributeError: virDomain instance has no attribute 'getCPUStats'

How can I reslove this error and can get CPU Status of VMs?

Thanking You, Kashyap

edit retag flag offensive close merge delete


Hi, is this just a libvirt question?

fifieldt gravatar imagefifieldt ( 2014-04-07 00:47:00 -0500 )edit

ya it is libvirt question. In my code i want to get VM CPU and i tried to get using getCPUStats command but i got that error which tells that virDomain has no attribute 'getCPUStats'.

Kashyap gravatar imageKashyap ( 2014-04-07 02:13:49 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2014-04-09 04:01:54 -0500

fifieldt gravatar image

This is a libvirt question, not related to OpenStack.

I suggest you ask on the libvirt-users mailing list:

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-04-05 01:57:55 -0500

Seen: 185 times

Last updated: Apr 09 '14