diff --git a/config/cron/minutely/loadstat b/config/cron/minutely/loadstat
new file mode 100644
index 000000000..9c6fdb968
--- /dev/null
+++ b/config/cron/minutely/loadstat
@@ -0,0 +1,13 @@
+#!/usr/bin/perl
+
+use RRDs;
+my $LOAD = '';
+my $CMD = "awk '{print \$1\":\"\$2\":\"\$3}' < /proc/loadavg";
+$LOAD=`$CMD`;
+chomp($LOAD);
+RRDs::update ("/var/log/rrd/load.rrd",
+ "-t", "load1:load5:load15",
+ "N:$LOAD");
+
+my $ERROR = RRDs::error;
+print "$ERROR\n" if $ERROR;
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 999984b07..5dbdd646b 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,4 +1,13 @@
------------------------------------------------------------------------
+r258 | ms | 2006-08-26 15:20:12 +0200 (Sat, 26 Aug 2006) | 6 lines
+
+Hinzugefuegt:
+ * QoS-Graphen - Erste Version!
+Pakete:
+ * Applejuice bearbeitet
+ * Depends.txt in alle eingefuegt
+ * Clamav bearbeitet
+------------------------------------------------------------------------
r257 | ms | 2006-08-26 10:42:48 +0200 (Sat, 26 Aug 2006) | 5 lines
Update:
diff --git a/html/cgi-bin/graphs.cgi b/html/cgi-bin/graphs.cgi
index a29459671..fbc484414 100644
--- a/html/cgi-bin/graphs.cgi
+++ b/html/cgi-bin/graphs.cgi
@@ -61,7 +61,7 @@ sub diskbox {
&Header::openbigbox('100%', 'left');
-if ($cgigraphs[1] =~ /(GREEN|BLUE|ORANGE|RED|lq|cpu|memory|swap|disk)/) {
+if ($cgigraphs[1] =~ /(GREEN|BLUE|ORANGE|RED|lq|cpu|memory|swap|disk|load)/) {
my $graph = $cgigraphs[1];
my $graphname = ucfirst(lc($cgigraphs[1]));
&Header::openbox('100%', 'center', "$graphname $Lang::tr{'graph'}");
@@ -124,6 +124,19 @@ if ($cgigraphs[1] =~ /(GREEN|BLUE|ORANGE|RED|lq|cpu|memory|swap|disk)/) {
print "
\n";
&Header::closebox();
+ &Header::openbox('100%', 'center', "Load $Lang::tr{'graph'}");
+ if (-e "$graphdir/load-day.png") {
+ my $ftime = localtime((stat("$graphdir/load-day.png"))[9]);
+ print "
$Lang::tr{'the statistics were last updated at'}: $ftime
\n";
+ print "";
+ print "
";
+ print "";
+ } else {
+ print $Lang::tr{'no information available'};
+ }
+ print "
\n";
+ &Header::closebox();
+
&Header::openbox('100%', 'center', "Memory $Lang::tr{'graph'}");
if (-e "$graphdir/memory-day.png") {
my $ftime = localtime((stat("$graphdir/memory-day.png"))[9]);
diff --git a/lfs/fcron b/lfs/fcron
index 4f2589fb6..1db9b9bc6 100644
--- a/lfs/fcron
+++ b/lfs/fcron
@@ -89,6 +89,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
chmod u-s /usr/bin/fcrontab /usr/bin/fcronsighup
mkdir -p /etc/fcron.minutely /etc/fcron.cyclic /etc/fcron.hourly \
/etc/fcron.daily /etc/fcron.weekly /etc/fcron.monthly
+ cp -vf $(DIR_CONF)/cron/minutely/* /etc/fcron.minutely
+ chmod -v 755 /etc/fcron.minutely/*
/usr/bin/fcrontab $(DIR_SRC)/config/cron/crontab
@rm -rf $(DIR_APP)
@$(POSTBUILD)
diff --git a/lfs/mc b/lfs/mc
index b8901f40a..8b27ba042 100644
--- a/lfs/mc
+++ b/lfs/mc
@@ -78,7 +78,8 @@ $(subst %,%_MD5,$(objects)) :
$(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
@$(PREBUILD)
@rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
- cd $(DIR_APP) && ./configure --prefix=/usr --without-x --disable-nls
+ cd $(DIR_APP) && ./configure --prefix=/usr --without-x --disable-nls \
+ --with-screen=mcslang # --with-samba
cd $(DIR_APP) && make
cd $(DIR_APP) && make install
@rm -rf $(DIR_APP)
diff --git a/src/scripts/makegraphs b/src/scripts/makegraphs
index 8f9aa6761..03a53fede 100644
--- a/src/scripts/makegraphs
+++ b/src/scripts/makegraphs
@@ -184,6 +184,47 @@ sub updatecpudata {
}
+sub updateloadgraph {
+ my $period = $_[0];
+
+ RRDs::graph ("$graphs/load-$period.png",
+ "--start", "-1$period", "-aPNG",
+ "-w 600", "-h 100", "-i", "-z", "-l 0", "-r", "--alt-y-grid",
+ "-t Load Average",
+ "--color", "SHADEA#EAE9EE",
+ "--color", "SHADEB#EAE9EE",
+ "--color", "BACK#FFFFFF",
+ "DEF:load1=$rrdlog/load.rrd:load1:AVERAGE",
+ "DEF:load5=$rrdlog/load.rrd:load5:AVERAGE",
+ "DEF:load15=$rrdlog/load.rrd:load15:AVERAGE",
+ "AREA:load1#ff0000:1 Minute, letzter\:",
+ "GPRINT:load1:LAST:%5.2lf\n",
+ "AREA:load5#ff9900:5 Minuten, letzter\:",
+ "GPRINT:load5:LAST:%5.2lf\n",
+ "AREA:load15#ffff00:15 Minuten, letzter\:",
+ "GPRINT:load15:LAST:%5.2lf",
+ "LINE1:load5#ff9900:",
+ "LINE1:load1#ff0000:");
+ $ERROR = RRDs::error;
+ print "Error in RRD::graph for load: $ERROR\n" if $ERROR;
+}
+
+sub updateloaddata {
+ if ( ! -e "$rrdlog/load.rrd") {
+ RRDs::create ("$rrdlog/load.rrd", "--step=60",
+ "DS:load1:GAUGE:120:0:U",
+ "DS:load5:GAUGE:120:0:U",
+ "DS:load15:GAUGE:120:0:U",
+ "RRA:AVERAGE:0.5:1:2160",
+ "RRA:AVERAGE:0.5:5:2016",
+ "RRA:AVERAGE:0.5:15:2880",
+ "RRA:AVERAGE:0.5:60:8760");
+
+ $ERROR = RRDs::error;
+ print "Error in RRD::create for cpu: $ERROR\n" if $ERROR;
+ }
+}
+
sub updatememgraph {
my $period = $_[0];
@@ -1013,6 +1054,12 @@ updatecpugraph ("week");
updatecpugraph ("month");
updatecpugraph ("year");
+updateloaddata();
+updateloadgraph ("day");
+updateloadgraph ("week");
+updateloadgraph ("month");
+updateloadgraph ("year");
+
updatememdata();
updatememgraph ("day");
updatememgraph ("week");