I also looked at similar code for several other operating systems.  At least
some of them already store the counters as 'unsigned long long', and do a
conversion right before returning the data.

On Wed, May 5, 2010 at 18:33, Jesse Becker <haw...@gmail.com> wrote:

> Could you please re-base this patch off of trunk?  Once done, I'll test and
> commit it.
>
> Thanks for the patch!
>
> On Wed, May 5, 2010 at 09:47, Rafael Xavier de Souza 
> <rxavi...@br.ibm.com>wrote:
>
>>  This patch fixes CPU system and idle metrics. Ganglia uses float
>> variables (double) to store the jiffies and the jiffies sums. But, Float
>> numbers have a problem with precision and Ganglia is getting lost with big
>> ppc64 numbers on its calculations. This patch changes
>> libmetrics/linux/metrics.c to use integers (unsined long long) to store the
>> jiffies and jiffies sums and floats (double) to store the calculated numbers
>> only.
>>
>>
>> Signed off by: Rafael Xavier <rxavi...@br.ibm.com> <rxavi...@br.ibm.com>
>>
>> OBS:
>> 1) This patch has been sniff tested, but not extensively.
>> 2) It fixes it for linux only. The ideal approach would be to make the
>> same changes for other OSes as well.
>>
>> --
>>
>> Rafael Xavier de Souza
>> Linux Technology Center Software Engineer
>> IBM Systems & Technology Group
>>     rxavi...@br.ibm.com
>> MM17 Hortolândia-SP, Brazil
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> Ganglia-developers mailing list
>> Ganglia-developers@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/ganglia-developers
>>
>>
>
>
> --
> Jesse Becker
> Every cloud has a silver lining, except for the mushroom-shaped ones, which
> come lined with strontium-90.
>
>


-- 
Jesse Becker
Every cloud has a silver lining, except for the mushroom-shaped ones, which
come lined with strontium-90.

<<image/png>>

<<image/png>>

<<image/png>>

<<image/png>>

------------------------------------------------------------------------------
_______________________________________________
Ganglia-developers mailing list
Ganglia-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ganglia-developers

Reply via email to