]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/cfgroot/graphs.pl
graphs.pl remove lower bound for frequencies
[people/pmueller/ipfire-2.x.git] / config / cfgroot / graphs.pl
index 7a0f643d09ca945926e2862e48ec85f10eac7419..8d047c2a50e582de6c53e8c75778cab80e16f83f 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"},
@@ -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 = (
                "-",
@@ -1009,7 +1009,6 @@ sub updatecpufreqgraph {
                "--alt-y-grid",
                "-w 600",
                "-h 125",
-               "-l 0",
                "-r",
                "-t ".$Lang::tr{'cpu frequency per'}." ".$Lang::tr{$period},
                "-v MHz",
@@ -1042,7 +1041,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 2>/dev/null`;
+       my $thermalcount = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/thermal-thermal_zone* 2>/dev/null | wc -l`;
        my $period    = $_[0];
        my @command = (
                "-",
@@ -1097,6 +1096,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;
 }