<div dir="ltr">The math is here: <a href="https://github.com/openstack/ceilometer/blob/master/ceilometer/transformer/conversions.py#L137">https://github.com/openstack/ceilometer/blob/master/ceilometer/transformer/conversions.py#L137</a><div>
<br></div><div>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 <span class="" style="background-color:rgb(255,255,255);color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">volume_delta</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"> </span><span class="" style="font-weight:bold;color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">/</span><span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre"> </span><span class="" style="background-color:rgb(255,255,255);color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre">time_delta</span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-05-15 0:07 GMT+08:00 Alejandro Comisario <span dir="ltr"><<a href="mailto:alejandro.comisario@mercadolibre.com" target="_blank">alejandro.comisario@mercadolibre.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Suo.<br>
Still, i dont get how the math is repressented, can you explain how<br>
this uses the cpuTime for each vm to get the % ?<br>
Thanks a lot!<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
On Wed, May 14, 2014 at 12:57 PM, Guangyu Suo <<a href="mailto:guangyu@unitedstack.com">guangyu@unitedstack.com</a>> wrote:<br>
><br>
> Hi,<br>
><br>
> The cpu_util is calculated by cpu time in pipeline's transformer: <a href="https://github.com/openstack/ceilometer/blob/master/etc/ceilometer/pipeline.yaml#L43" target="_blank">https://github.com/openstack/ceilometer/blob/master/etc/ceilometer/pipeline.yaml#L43</a><br>

><br>
><br>
> 2014-05-14 22:55 GMT+08:00 Alejandro Comisario <<a href="mailto:alejandro.comisario@mercadolibre.com">alejandro.comisario@mercadolibre.com</a>>:<br>
>><br>
>> Hi Guys, any help regarding this matter ?<br>
>><br>
>><br>
>> On Tue, May 13, 2014 at 5:53 PM, Alejandro Comisario <<a href="mailto:alejandro.comisario@mercadolibre.com">alejandro.comisario@mercadolibre.com</a>> wrote:<br>
>>><br>
>>> Hi guys, sorry if this has been asked already.<br>
>>><br>
>>> I dont seem to find the cpu % util implementation for libvirt using qemu.<br>
>>><br>
>>> <a href="https://github.com/openstack/ceilometer/blob/master/ceilometer/compute/virt/libvirt/inspector.py" target="_blank">https://github.com/openstack/ceilometer/blob/master/ceilometer/compute/virt/libvirt/inspector.py</a><br>

>>><br>
>>> Is it possible to get it or the code is somewere else ?<br>
>>> Its no real use the % time since i need de % util to compare it<br>
>>> against the overall host % cpu.<br>
>>><br>
>>> Can you help me understand what am i geting wrong ?<br>
>>> If so, how this is / should be calculated ?<br>
>>><br>
>>> Thanks a lot!<br>
>>><br>
>>> -------------<br>
>>> alejandrito<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> Mailing list: <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
>> Post to     : <a href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a><br>
>> Unsubscribe : <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> 索广宇(Guangyu Suo)<br>
> UnitedStack Inc.<br>
><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><div>索广宇(Guangyu Suo)</div><div>UnitedStack Inc.</div><div><br></div></div>
</div>