Bugzilla – Bug 209
fix for bogus uptime metrics
Last modified: 2008-09-12 22:39:44
You need to log in before you can comment on or make changes to this bug.
gmond was reporting the last boot time as the epoch on our systems (Sun 8-core x2200s and 4-core x4100s running SuSE 10.3) and so reporting bogus uptimes. The reason is that /proc/stat is too big (~9kB) for the allocated buffer, so the data at the end aren't read. This fixes it on these systems, but I don't know what determines the size of /proc/stat and whether it might need an even bigger buffer sometimes. This is against 3.0.7, but looks appropriate for the head source too. 2008-08-23 Dave Love <d.love@liverpool.ac.uk> * libmetrics/linux/metrics.c (BUFFSIZE): Double size to account for large /proc/stat on some systems. --- libmetrics/linux/metrics.c 2008/08/23 09:55:23 1.1 +++ libmetrics/linux/metrics.c 2008/08/23 10:05:53 @@ -35,7 +35,7 @@ /* Never changes */ #ifndef BUFFSIZE -#define BUFFSIZE 8192 +#define BUFFSIZE 16384 #endif char proc_cpuinfo[BUFFSIZE]; char proc_sys_kernel_osrelease[BUFFSIZE];
Hi Dave: Thanks for the patch! This looks like a dup of 169 though: http://bugzilla.ganglia.info/cgi-bin/bugzilla/show_bug.cgi?id=169 Perhaps you can submit your patch there and close this one as a dup of 169?
*** This bug has been marked as a duplicate of 169 ***