Displaying 2 results from an estimated 2 matches for "vir_node_cpu_stats_all_cpus".
2013 Apr 01
0
nparams in virNodeGetCPUStats and CPU utilization
Hi,
I am trying to get the CPU utilization of a node and I am using
virNodeGetCPUStats(...)
Here is my code snippet. The error checking is omitted for brevity.
/* get the number of params */
retval = virNodeGetCPUStats (conn, VIR_NODE_CPU_STATS_ALL_CPUS,\
NULL, &nparams, 0);
printf ("nparams: %d\n", nparams);
/* allocate space for the params */
params = (virNodeCPUStatsPtr *) malloc (sizeof (virNodeCPUStats) *
nparams );
/* get the values */
retval = virNodeGetCPUStats (conn, VIR_NODE_CPU_STATS_ALL_CPUS,\...
2012 Jul 10
1
Issue with getCPUStats and getMemoryStats
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,...