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

Re: [libvirt] [PATCHv3 2/8] qemu: bulk stats: implement CPU stats group



----- Original Message -----
> From: "Peter Krempa" <pkrempa redhat com>
> To: "Francesco Romani" <fromani redhat com>, libvir-list redhat com
> Sent: Tuesday, September 9, 2014 1:50:25 PM
> Subject: Re: [libvirt] [PATCHv3 2/8] qemu: bulk stats: implement CPU stats group
> 
> On 09/08/14 15:05, Francesco Romani wrote:
> > This patch implements the VIR_DOMAIN_STATS_CPU_TOTAL
> > group of statistics.
> > 
> > Signed-off-by: Francesco Romani <fromani redhat com>
> > ---
> >  include/libvirt/libvirt.h.in |  1 +
> >  src/libvirt.c                |  9 ++++++++
> >  src/qemu/qemu_driver.c       | 51
> >  ++++++++++++++++++++++++++++++++++++++++++++
> >  3 files changed, 61 insertions(+)
> > 
> > diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> > index aced31c..e6ed803 100644
> > --- a/include/libvirt/libvirt.h.in
> > +++ b/include/libvirt/libvirt.h.in
> > @@ -2511,6 +2511,7 @@ struct _virDomainStatsRecord {
> >  
> >  typedef enum {
> >      VIR_DOMAIN_STATS_STATE = (1 << 0), /* return domain state */
> > +    VIR_DOMAIN_STATS_CPU_TOTAL = (1 << 1), /* return domain CPU info */
> >  } virDomainStatsTypes;
> >  
> >  typedef enum {
> > diff --git a/src/libvirt.c b/src/libvirt.c
> > index 4806535..4d504ff 100644
> > --- a/src/libvirt.c
> > +++ b/src/libvirt.c
> > @@ -21554,6 +21554,15 @@ virConnectGetDomainCapabilities(virConnectPtr
> > conn,
> >   * "state.reason" - reason for entering given state, returned as int from
> >   *                  virDomain*Reason enum corresponding to given state.
> >   *
> > + * VIR_DOMAIN_STATS_CPU_TOTAL: Return CPU statistics and usage
> > information.
> > + * The typed parameter keys are in this format:
> > + * "cpu.count" - number as unsigned int of physical cpus available to
> > + *               this domain.
> 
> This is not really a VM property rather than a host property. I don't
> think we should report this as it will be the same for all VMs on the host.

I'm OK with this. Just tried to mimic as closesly as possible the existing
behaviour, but you have a point here.

-- 
Francesco Romani
RedHat Engineering Virtualization R & D
Phone: 8261328
IRC: fromani


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