My Pi2 is running Raspbian and I've installed Cacti 0.8.8b with apt-get.
Cacti works well with the default graphs and some others I've added later on (I'm monitoring my Ubiquiti EdgeRouter).
Now I'm trying to monitor the Pi's temperature with the following perl script:
Code: Select all
#!/usr/bin/perl
delete @ENV{qw(PATH)};
$ENV{PATH} = "/usr/bin:/bin";
$path = $ENV{'PATH'};
open(PROCESS, "/opt/vc/bin/vcgencmd measure_temp |");
$avg = <PROCESS>;
close(PROCESS);
$avg =~ s/^.*=(\d{2}\.\d)'?C?$//;
print "$1";
I followed the installation steps very carefully but I'm still not able to get the temperature data in the graph.
When I run the perl script,
Code: Select all
sudo perl temp_rpi.pl
Code: Select all
CMDPHP: Poller[0] Host[1] DS[8] WARNING: Result from CMD not valid. Partial Result: U
Code: Select all
print “$1”;
Code: Select all
print “40”;
What should I do?