[mrtg] Cannot Fill new Graph

Daniel McDonald dan.mcdonald at austinenergy.com
Mon Mar 28 18:42:56 CEST 2011




On 3/28/11 10:42 AM, "Nylan" <deadyoda at gmail.com> wrote:

> Hi all,

I would like to get some advices from you.

I have a working MRTG
> webpage there : http://nylan.homelinux.com/mrtg/

I want to add a graph with
> my CPU temp.

I created the file temp.pl in my script folder with
> :
#!/usr/bin/perl

$dummy =`sensors | grep "temp1"`;
$dummy=~ /temp1:
> \+(.*)\°C /;
print "$1\n$1\n0\n0";

If I launch this file with 
perl
> ./temp.pl
I'm returned something like this : 
62.5
62.5
0
0



Rateup only understands integers.  You may wish to multiply the numbers by
10, and use a factor[] 10 statement to keep the precision and display it
properly.  Or convert to an rrdtool backend.


-- 
Daniel J McDonald, CCIE # 2495, CISSP # 78281




More information about the mrtg mailing list