my @processesgraph = `ls -dA $mainsettings{'RRDLOG'}/collectd/localhost/processes-*/ 2>/dev/null`;
return @processesgraph;
}
+
+sub updateentropygraph {
+ my $period = $_[0];
+ my @command = (
+ "-",
+ "--start",
+ "-1".$period,
+ "-aPNG",
+ "-i",
+ "-z",
+ "-W www.ipfire.org",
+ "--alt-y-grid",
+ "-w 600",
+ "-h 225",
+ "-r",
+ "--lower-limit","0",
+ "-t $Lang::tr{'entropy'}",
+ "-v $Lang::tr{'bit'}",
+ "DEF:entropy=$mainsettings{'RRDLOG'}/collectd/localhost/entropy/entropy.rrd:entropy:AVERAGE",
+ "CDEF:entropytrend=entropy,43200,TREND",
+ "LINE3:entropy#ff0000:" . sprintf("%-15s", $Lang::tr{'entropy'}),
+ "VDEF:entrmin=entropy,MINIMUM",
+ "VDEF:entrmax=entropy,MAXIMUM",
+ "VDEF:entravg=entropy,AVERAGE",
+ "GPRINT:entrmax:" . sprintf("%12s\\: %%5.0lf", $Lang::tr{'maximum'}),
+ "GPRINT:entrmin:" . sprintf("%12s\\: %%5.0lf", $Lang::tr{'minimum'}),
+ "GPRINT:entravg:" . sprintf("%12s\\: %%5.0lf", $Lang::tr{'average'}) . "\\n",
+ "LINE3:entropytrend#000000",
+ );
+
+ RRDs::graph (@command);
+ $ERROR = RRDs::error;
+
+ print "Error in RRD::graph for entropy: ".$ERROR."\n" if $ERROR;
+}