Xymon Mailing List Archive search

rrd and do_disk.c: 32 bit limit reached

5 messages in this thread

list Dominique Frise · Tue, 01 Apr 2008 18:10:42 +0200 ·
Hi,

Using "disk1" graphs for the trends column, we noticed that file systems above 2 TB of used space did not show up.

The problem comes from the hobbitd/rrd/do_disk.c. The "long long aused" variable is properly defined but the value affectation should use "atoll" (el el) function and not "atoi".


To fix: replace all atoi calls for aused var by atoll, recompile and copy hobbitd_rrd were Hobbit lives.


[super at iris rrd]# diff do_disk.c do_disk.c.dist
102c102
< 			aused = atoll(columns[3]);
---
			aused = atoi(columns[3]);
127c127
< 			aused = atoll(columns[2]);
---
			aused = atoi(columns[2]);
133c133
< 			aused = atoll(columns[2]);
---
			aused = atoi(columns[2]);

Dominique
UNIL - University of Lausanne
list Henrik Størner · Tue, 1 Apr 2008 22:36:50 +0200 ·
quoted from Dominique Frise
On Tue, Apr 01, 2008 at 06:10:42PM +0200, Dominique Frise wrote:
Using "disk1" graphs for the trends column, we noticed that file systems above 2 TB of used space did not show up.

The problem comes from the hobbitd/rrd/do_disk.c. The "long long aused" variable is properly defined but the value affectation should use "atoll" (el el) function and not "atoi".
Unfortunately, "atoll()" does not exist in several popular Unix
variants....


Regards,
Henrik
list Dominique Frise · Wed, 02 Apr 2008 08:28:37 +0200 ·
How about using "strtoll()" then?


Dominique
UNIL - University of Lausanne
quoted from Henrik Størner

Henrik Stoerner wrote:
On Tue, Apr 01, 2008 at 06:10:42PM +0200, Dominique Frise wrote:
Using "disk1" graphs for the trends column, we noticed that file systems above 2 TB of used space did not show up.

The problem comes from the hobbitd/rrd/do_disk.c. The "long long aused" variable is properly defined but the value affectation should use "atoll" (el el) function and not "atoi".
Unfortunately, "atoll()" does not exist in several popular Unix
variants....


Regards,
Henrik

list Henrik Størner · Thu, 3 Apr 2008 07:51:48 +0200 ·
quoted from Dominique Frise
On Tue, Apr 01, 2008 at 06:10:42PM +0200, Dominique Frise wrote:
The problem comes from the hobbitd/rrd/do_disk.c. The "long long aused" 
variable is properly defined but the value affectation should use "atoll" 
(el el) function and not "atoi".
I've just committed a fix that should handle this in a portable way.


Regards,
Henrik
list Dominique Frise · Thu, 03 Apr 2008 08:08:28 +0200 ·
Thanks!

Dominique
UNIL - University of Lausanne


Henrik Stoerner wrote:
On Tue, Apr 01, 2008 at 06:10:42PM +0200, Dominique Frise wrote:
The problem comes from the hobbitd/rrd/do_disk.c. The "long long aused" variable is properly defined but the value affectation should use "atoll" (el el) function and not "atoi".
I've just committed a fix that should handle this in a portable way.


Regards,
Henrik