[libvirt] [PATCHv6 0/6] Add virNodeGetCPUStats() API

KAMEZAWA Hiroyuki kamezawa.hiroyu at jp.fujitsu.com
Mon May 30 03:22:51 UTC 2011


On Mon, 30 May 2011 11:03:35 +0900
Minoru Usui <usui at mxm.nes.nec.co.jp> wrote:

> On Mon, 30 May 2011 09:36:50 +0900
> KAMEZAWA Hiroyuki <kamezawa.hiroyu at jp.fujitsu.com> wrote:
> 
> > On Wed, 25 May 2011 15:01:29 +0900
> > Minoru Usui <usui at mxm.nes.nec.co.jp> wrote:
> > 
> > > Hi,
> > > 
> > > This is v6 of virNodeGetCPUTimeParameters() API. 
> > > (This time, I rename it to virNodeGetCPUStats())
> > > It returns cpu utilization or 
> > > cumulative cpu time of the node from /proc/stat since node boots up.
> > > This patch only supports linux host.
> > > 
> > 
> > Can I make a question ?
> > 
> > What "CPU' means here ? 
> > 
> > CPU usage statistics from the Guest OS's point of view  ?
> > 
> > Do we get the information by asking an daemon or module on the guest 
> > to gather statistics on the guest ?
> 
> No.
> This API gets host cpu statistics, not guest.
> 
> It's just read statistics from /proc/stat of the host.
> 

ok.

I have a patch to get per-domain/per-cpu cpu usage statistics by using
cpuacct cgroup.
(for fixining #virt-top -1.)
yours are per-conn, mine is per-domain.

I'd like to remake my patch to use the same style as yours and
to use the same macro/params.
 
As...
==
int                     virDomainGetCPUStats (virDomainPtr dom,
                                            virCPUStatsPtr params,
                                            int *nparams,
                                            unsigned int flags);

==
I think "kernel" and "user", for linux.
Thank you for your patch.

Thanks,
-Kame








More information about the libvir-list mailing list