On 09/02/2014 06:31 AM, Francesco Romani wrote: > This patch implements the VIR_DOMAIN_STATS_VCPU > group of statistics. > > Signed-off-by: Francesco Romani <[email protected]> > --- > include/libvirt/libvirt.h.in | 1 + > src/libvirt.c | 8 +++++ > src/qemu/qemu_driver.c | 72 > ++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 81 insertions(+) >
> *
> + * VIR_DOMAIN_STATS_VCPU: Return virtual CPU statistics.
> + * The typed parameter keys are in this format:
> + * "vcpu.current" - current number of online virtual CPUs
> + * "vcpu.maximum" - maximum number of online virtual CPUs
> + * "vcpu.<num>.state" - state of the virtual CPU <num>
Is this an int mapping to some particular enum?
> + * "vcpu.<num>.time" - virtual cpu time spent by virtual CPU <num>
> + * "vcpu.<num>.cpu" - physical CPU pinned to virtual CPU <num>
Missing types.
Should there be a parameter vcpu.count that says how many vcpu.<num>
entries to expect? Or is that vcpu.current? Or do we have a situation
where if cpus 0 and 2 are online but 1 and 3 are offline, then we have
vcpu.0.x and vcpu2.x but not vcpu1.x?
A bit more documentation will help the user deciding which "array"
entries to expect, and whether the "array" will be sparse if cpus are
offline.
> +{
> + size_t i;
> + int ret = -1;
> + char param_name[NAME_MAX];
NAME_MAX (typically 256) is huge, compared to
VIR_TYPED_PARAM_FIELD_LENGTH (80).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/libvir-list
