Re: [PATCH] bhyve: implement domainGetCPUStats

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  Roman Bogorodskiy wrote:

> For per CPU stats, implement virBhyveGetDomainPercpuStats() that
> uses bhyvectl tool to obtain the guest's vcpu stats.
> 
> For total CPU stats, add virBhyveGetDomainTotalCpuStats() that
> gets the hypervisor process CPU stats using kvm (kernel
> memory interface).
> ---
>  configure.ac              |   7 +++
>  src/bhyve/bhyve_driver.c  |  38 +++++++++++++
>  src/bhyve/bhyve_process.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++
>  src/bhyve/bhyve_process.h |  10 ++++
>  4 files changed, 191 insertions(+)
> diff --git a/src/bhyve/bhyve_process.c b/src/bhyve/bhyve_process.c
> index a557bc5..e1f4324 100644
> --- a/src/bhyve/bhyve_process.c
> +++ b/src/bhyve/bhyve_process.c

...

> +int
> +virBhyveGetDomainTotalCpuStats(virDomainObjPtr vm,
> +                               virTypedParameterPtr params ATTRIBUTE_UNUSED,
> +                               unsigned int nparams)
> +{
> +    struct kinfo_proc* kp;
> +    kvm_t* kd;

Just noticed that it should be:

struct kinfo_proc *kp;
kvm_t *kd;

I will not re-send the patch just because of that and will include the
fix in the next version.

> +    char errbuf[_POSIX2_LINE_MAX];
> +    int nprocs;
> +    int ret = -1;

Roman Bogorodskiy

Attachment: pgpNGjtpaUmut.pgp
Description: PGP signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]