search for: virnodecpustats

Displaying 1 result from an estimated 1 matches for "virnodecpustats".

2013 Apr 01
0
nparams in virNodeGetCPUStats and CPU utilization
...re 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,\ params, &nparams, 0); for ( i = 0 ; i < nparams ; i++) { printf ("params[%d].field: %s \tparams[%d].value: %llu\n",...