[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] graph problems + patch
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] graph problems + patch
- From: Gianluca Rossi <grossi (at) acantho.net>
- Date: Thu, 07 Jul 2005 12:28:22 +0200
- References: <42CBD429.9010604@acantho.net>
- User-agent: Debian Thunderbird 1.0.2 (X11/20050331)
Gianluca Rossi wrote:
- on all linux client the vmstat graph was empty, and the error message
was:
/dati/hobbit/data/rrd/blu/vmstat.rrd from 127.0.0.1: unknown DS name
'cpu_w'
i have deleted the bigbrother vmstat.rrd, and the new one is correct.
OK, i have seen that this is documented .. sorry
- on all windows client, the "memory" graph is always zero (not empty).
It seems that i have found something wrong in larrd/do_la.c : the first
error seems a typo, that zeoes the data collected.
the second is that the function atol return a signed long integer, and
cannot report memory sizes > 2Gb.
I have written a small patch, using a specific gcc extension: the
function atoll and the long long integer (64 bit).
I am the only one having trouble with memory graph on windows machines???
--
Gianluca
--- do_la.c.orig 2005-07-07 12:14:19.000000000 +0200
+++ do_la.c 2005-07-07 11:54:09.000000000 +0200
@@ -189,27 +189,27 @@
if (memhosts_init && (rbtFind(memhosts, hostname) == rbtEnd(memhosts))) {
/* Pick up memory statistics */
int found, realuse, swapuse;
- unsigned long phystotal, physavail, pagetotal, pageavail;
+ unsigned long long phystotal, physavail, pagetotal, pageavail;
found = realuse = swapuse = 0;
phystotal = physavail = pagetotal = pageavail = 0;
p = strstr(msg, "Total Physical memory:");
- if (p) { found++; phystotal = atol(strchr(p, ':') + 1); }
+ if (p) { found++; phystotal = atoll(strchr(p, ':') + 1); }
if (found == 1) {
p = strstr(msg, "Available Physical memory:");
- if (p) { found++; physavail = atol(strchr(p, ':') + 1); }
+ if (p) { found++; physavail = atoll(strchr(p, ':') + 1); }
}
if (found == 2) {
p = strstr(msg, "Total PageFile size:");
- if (p) { found++; pagetotal = atol(strchr(p, ':') + 1); }
+ if (p) { found++; pagetotal = atoll(strchr(p, ':') + 1); }
}
- if (found == 2) {
+ if (found == 3) {
p = strstr(msg, "Available PageFile size:");
- if (p) { found++; pageavail = atol(strchr(p, ':') + 1); }
+ if (p) { found++; pageavail = atoll(strchr(p, ':') + 1); }
}
if (found == 4) {