[libvirt] [PATCH 2/2] cpustats: report user and sys times

Osier Yang jyang at redhat.com
Sat Mar 10 11:25:08 UTC 2012


On 2012年03月10日 01:37, Eric Blake wrote:
> Thanks to cgroups, providing user vs. system time of the overall
> guest is easy to add to our existing API.
>
> * include/libvirt/libvirt.h.in (VIR_DOMAIN_CPU_STATS_USERTIME)
> (VIR_DOMAIN_CPU_STATS_SYSTEMTIME): New constants.
> * src/util/virtypedparam.h (virTypedParameterArrayValidate)
> (virTypedParameterAssign): Enforce checking the result.
> * src/qemu/qemu_driver.c (qemuDomainGetPercpuStats): Fix offender.
> (qemuDomainGetTotalcpuStats): Implement new parameters.
> * tools/virsh.c (cmdCPUStats): Tweak output accordingly.
> ---
>   include/libvirt/libvirt.h.in |   12 +++++++++++
>   src/qemu/qemu_driver.c       |   45 ++++++++++++++++++++++++++++++++++-------
>   src/util/virtypedparam.h     |    5 ++-
>   tools/virsh.c                |   12 ++++++----
>   4 files changed, 59 insertions(+), 15 deletions(-)
>

ACK




More information about the libvir-list mailing list