[libvirt] [PATCHv2 08/11] qemu: bulk stats: implement VCPU group
Eric Blake
eblake at redhat.com
Tue Sep 2 23:00:53 UTC 2014
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 <fromani at redhat.com>
> ---
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140902/143b4824/attachment-0001.sig>
More information about the libvir-list
mailing list