[rrd-users] Re: rrdtool and mbmon?
Milan Obuch
milan.obuch at bluegrass.sk
Wed Jun 9 09:32:45 MEST 2004
On Wednesday 09 June 2004 08:50, Can-Carlo Dörtbudak wrote:
> Hi there,
>
> i'm new in using rrdtool, but it's a good tool. Now have problem with
> mbmon. Does anyone use mbmon to collect temperature from cpu? I don't know
> how to manage this. Could you help me a bit.
>
> Can
Hi,
this is part of my script doing just that:
use RRDs;
local $rrddir = '/datadir';
local $current_time = time;
die("can't run 'mbmon'") unless open(MBMON,'/usr/local/bin/mbmon -c 1 |');
while (<MBMON>)
{chomp;
next if /^$/;
if (/^Temp.=\s*(\d+\.\d+),\s*(\d+\.\d+),\s*(\d+\.\d+);/)
{RRDs::update("${rrddir}/t/1.rrd","${current_time}:${1}");
RRDs::update("${rrddir}/t/2.rrd","${current_time}:${2}");
RRDs::update("${rrddir}/t/3.rrd","${current_time}:${3}");
}
}
close(MBMON);
mbmon reports 3 temperatures, so I created 3 rrd files using following
RRDs::create($file,
'--step','300',
'DS:t:GAUGE:600:-50:150', # min -50 degrees, max 150 degrees
'RRA:AVERAGE:0.5:1:600', # 600 * 5 min = 2 d 2 h
'RRA:AVERAGE:0.5:6:700', # 700 * 30 min = 14 d 14 h
'RRA:AVERAGE:0.5:24:775', # 775 * 2 h = 64 d 14 h
'RRA:AVERAGE:0.5:288:797', # 797 * 24 h = 797 d
'RRA:MIN:0.5:288:797',
'RRA:MAX:0.5:288:797',
);
Hope this helps.
Regards,
Milan
--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list