[rrd-users] memory graphs
Leonardo dos Santos Goldim
goldim at inf.ulbra.tche.br
Tue Oct 18 20:22:18 MEST 2005
Hi guys,
i'm here again...
weel, i'm trying to build the memory graph, but some strange problems
are happen...
here are the step i do:
first i create the rrd file:
RRDs::create($RRDPATH."/system/memory.rrd",
"--step=300",
"DS:used:COUNTER:200:0:U",
"DS:cached:COUNTER:200:0:U",
"DS:buffer:COUNTER:200:0:U",
"DS:shared:COUNTER:200:0:U",
"DS:free:COUNTER:200:0:U",
"RRA:AVERAGE:0.5:1:1440",
"RRA:AVERAGE:0.5:30:336",
"RRA:AVERAGE:0.5:60:744",
"RRA:AVERAGE:0.5:1440:365",
"RRA:MIN:0.5:1:1440",
"RRA:MIN:0.5:30:336",
"RRA:MIN:0.5:60:744",
"RRA:MIN:0.5:1440:365",
"RRA:MAX:0.5:1:1440",
"RRA:MAX:0.5:30:336",
"RRA:MAX:0.5:60:744",
"RRA:MAX:0.5:1440:365",
"RRA:LAST:0.5:1:1440",
"RRA:LAST:0.5:30:336",
"RRA:LAST:0.5:60:744",
"RRA:LAST:0.5:1440:365");
second, i update data:
$MEMDATA = `free -m |grep Mem | tr -s ' '`;
($trash,$MEMSIZE,$MEMUSED,$MEMFREE,$MEMSHARED,$MEMBUFFER,$MEMCACHED) =
split("\ ",$MEMDATA);
RRDs::update ($RRDPATH."/system/memory.rrd",
"N:".$MEMUSED.":".$MEMCACHED.":".$MEMBUFFER.":".$MEMSHARED.":".$MEMFREE);
my $Err = RRDs::error;
die "Error while updating: $Err\n" if $Err;
so, i build the graph:
$DEF[0]="DEF:used=$RRDPATH/system/memory.rrd:used:AVERAGE";
$DEF[1]="DEF:cached=$RRDPATH/system/memory.rrd:cached:AVERAGE";
$DEF[2]="DEF:buffer=$RRDPATH/system/memory.rrd:buffer:AVERAGE";
$DEF[3]="DEF:shared=$RRDPATH/system/memory.rrd:shared:AVERAGE";
$DEF[4]="DEF:free=$RRDPATH/system/memory.rrd:free:AVERAGE";
RRDs::graph($GRAPHPATH."/system/memory.png",
"--title=Uso de Memoria",
"--imgformat=PNG",
"--vertical-label=Mb",
"--width=450",
"--height=150",
"--upper-limit=$MEMSIZE",
"--lower-limit=0",
"--rigid",
"--color=MGRID#80C080",
"--color=GRID#808020",
"--color=FRAME#808080",
"--color=ARROW#808020",
"--color=SHADEA#404040",
"--color=SHADEB#404040",
@DEF,
"AREA:used#FF0000:Usada",
"AREA:cached#0000FF:Cache",
"AREA:buffer#00FF00:Buffer",
"AREA:shared#00FFFF:Compartilhada",
"AREA:free#FFFF00:Livre",
"COMMENT:\\n",
"COMMENT:\\n",
"GPRINT:used:MAX:Maximo \\: %.2lf",
"GPRINT:used:AVERAGE:Media \\: %.2lf",
"GPRINT:used:MIN:Minimo \\: %.2lf",
"GPRINT:used:LAST:Ultimo \\: %.2lf",
"GPRINT:cached:MAX:Maximo \\: %.2lf",
"GPRINT:cached:AVERAGE:Media \\: %.2lf",
"GPRINT:cached:MIN:Minimo \\: %.2lf",
"GPRINT:cached:LAST:Ultimo \\: %.2lf");
but my graph be clear, (i attach my graph to the message).
somebody know why this happen?
tks
-- Attached file removed by Ecartis and put at URL below --
-- Type: image/png
-- Size: 10k (10466 bytes)
-- URL : http://lists.ee.ethz.ch/p/03-memory.png
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list