]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/cfgroot/graphs.pl
load graph: fix unlocalized "minutes".
[people/pmueller/ipfire-2.x.git] / config / cfgroot / graphs.pl
index 3418c68a231789142932f6ae8888c56ab5352122..5eb96d8f771721e8e9eef6163391a026859ea0e3 100644 (file)
@@ -3,7 +3,7 @@
 ###############################################################################
 #                                                                             #
 # 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        #
@@ -53,7 +53,7 @@ if ( $mainsettings{'RRDLOG'} eq "" ){
 
 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 $_/*`){
@@ -100,7 +100,7 @@ sub makegraphbox {
 # 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 = (
                "-",
@@ -257,11 +257,11 @@ sub updateloadgraph {
                "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"},
@@ -773,7 +773,7 @@ sub updatehwtempgraph {
                "-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"},
@@ -996,7 +996,7 @@ sub updateqosgraph {
 # 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 = (
                "-",
@@ -1042,7 +1042,7 @@ sub updatecpufreqgraph {
 # 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 = (
                "-",
@@ -1097,6 +1097,6 @@ sub random_hex_color {
 }
 
 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;
 }