The math is here:
https://github.com/openstack/ceilometer/blob/master/ceilometer/transformer/conversions.py#L137

It will cache the previous cpu time sample first, and when the latter cpu
time sample comes, calculate the delta volume and the delta timestamp
between the previous and the latter, then we can get cpu util by
volume_delta / time_delta


2014-05-15 0:07 GMT+08:00 Alejandro Comisario <
[email protected]>:

> Thanks Suo.
> Still, i dont get how the math is repressented, can you explain how
> this uses the cpuTime for each vm to get the % ?
> Thanks a lot!
>
>
>
> On Wed, May 14, 2014 at 12:57 PM, Guangyu Suo <[email protected]>
> wrote:
> >
> > Hi,
> >
> > The cpu_util is calculated by cpu time in pipeline's transformer:
> https://github.com/openstack/ceilometer/blob/master/etc/ceilometer/pipeline.yaml#L43
> >
> >
> > 2014-05-14 22:55 GMT+08:00 Alejandro Comisario <
> [email protected]>:
> >>
> >> Hi Guys, any help regarding this matter ?
> >>
> >>
> >> On Tue, May 13, 2014 at 5:53 PM, Alejandro Comisario <
> [email protected]> wrote:
> >>>
> >>> Hi guys, sorry if this has been asked already.
> >>>
> >>> I dont seem to find the cpu % util implementation for libvirt using
> qemu.
> >>>
> >>>
> https://github.com/openstack/ceilometer/blob/master/ceilometer/compute/virt/libvirt/inspector.py
> >>>
> >>> Is it possible to get it or the code is somewere else ?
> >>> Its no real use the % time since i need de % util to compare it
> >>> against the overall host % cpu.
> >>>
> >>> Can you help me understand what am i geting wrong ?
> >>> If so, how this is / should be calculated ?
> >>>
> >>> Thanks a lot!
> >>>
> >>> -------------
> >>> alejandrito
> >>
> >>
> >>
> >> _______________________________________________
> >> Mailing list:
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> >> Post to     : [email protected]
> >> Unsubscribe :
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
> >>
> >
> >
> >
> > --
> > 索广宇(Guangyu Suo)
> > UnitedStack Inc.
> >
>



-- 
索广宇(Guangyu Suo)
UnitedStack Inc.
_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to     : [email protected]
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack

Reply via email to