###############################################################################
# #
# IPFire.org - A linux based firewall #
-# Copyright (C) 2008 Michael Tremer & Christian Schmidt #
+# Copyright (C) 2005-2010 IPFire Team #
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
my $count = 0;
my @sensorsgraphs = ();
-my @sensorsdir = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/`;
+my @sensorsdir = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/sensors-*/ 2>/dev/null`;
foreach (@sensorsdir){
chomp($_);chop($_);
foreach (`ls $_/*`){
# collectd we are now able to handle any kind of cpucount
sub updatecpugraph {
- my $cpucount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/cpu-*/ | wc -l`;
+ my $cpucount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/cpu-*/ 2>/dev/null | wc -l`;
my $period = $_[0];
my @command = (
"-",
"DEF:load1=".$mainsettings{'RRDLOG'}."/collectd/localhost/load/load.rrd:shortterm:AVERAGE",
"DEF:load5=".$mainsettings{'RRDLOG'}."/collectd/localhost/load/load.rrd:midterm:AVERAGE",
"DEF:load15=".$mainsettings{'RRDLOG'}."/collectd/localhost/load/load.rrd:longterm:AVERAGE",
- "AREA:load1".$color{"color13"}."A0:1 Minute:",
+ "AREA:load1".$color{"color13"}."A0:1 ".$Lang::tr{'minute'}.":",
"GPRINT:load1:LAST:%5.2lf",
- "AREA:load5".$color{"color18"}."A0:5 Minuten:",
+ "AREA:load5".$color{"color18"}."A0:5 ".$Lang::tr{'minutes'}.":",
"GPRINT:load5:LAST:%5.2lf",
- "AREA:load15".$color{"color14"}."A0:15 Minuten:",
+ "AREA:load15".$color{"color14"}."A0:15 ".$Lang::tr{'minutes'}.":",
"GPRINT:load15:LAST:%5.2lf\\j",
"LINE1:load5".$color{"color13"},
"LINE1:load1".$color{"color18"},
"-w 600",
"-h 125",
"-r",
- "-t ".$Lang::tr{'sensors temp'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period},
+ "-t ".$Lang::tr{'mbmon temp'}." ".$Lang::tr{'graph per'}." ".$Lang::tr{$period},
"--color=SHADEA".$color{"color19"},
"--color=SHADEB".$color{"color19"},
"--color=BACK".$color{"color21"},
# Generate the CPU Frequency Graph for the current period of time for values given by collectd an lm_sensors
sub updatecpufreqgraph {
- my $cpucount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/cpu-*/ | wc -l`;
+ my $cpucount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/cpu-*/ 2>/dev/null | wc -l`;
my $period = $_[0];
my @command = (
"-",
# Generate the Thermal Zone Temp CPU Graph
sub updatethermaltempgraph {
- my $thermalcount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/thermal-thermal_zone* | wc -l`;
+ my $thermalcount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/thermal-thermal_zone* 2>/dev/null | wc -l`;
my $period = $_[0];
my @command = (
"-",
}
sub getprocesses {
- my @processesgraph = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/processes-*/`;
+ my @processesgraph = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/processes-*/ 2>/dev/null`;
return @processesgraph;
}