From c772568a71455f82985fac83165ba0bffd5a8d22 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sun, 17 May 2009 19:58:27 +0200 Subject: [PATCH] Fix spikes in qos-graphs --- config/qos/makeqosscripts.pl | 14 ++++++++++++++ config/rootfiles/core/28/filelists/files | 1 + config/rootfiles/core/28/update.sh | 5 +++++ src/initscripts/init.d/networking/red | 4 ++-- 4 files changed, 22 insertions(+), 2 deletions(-) mode change 100755 => 100644 config/rootfiles/core/28/update.sh diff --git a/config/qos/makeqosscripts.pl b/config/qos/makeqosscripts.pl index a374a383bb..94b53a4663 100644 --- a/config/qos/makeqosscripts.pl +++ b/config/qos/makeqosscripts.pl @@ -111,6 +111,11 @@ print </dev/null 2>&1) & ( sleep 10 && /usr/local/bin/qosd $qossettings{'IMQ_DEV'} >/dev/null 2>&1) & + for i in \$(ls \$RRDLOG/class_*.rrd); do + rrdtool update \$i \$(date +%s): + done + echo "Quality of Service was successfully started!" exit 0 ;; @@ -692,6 +701,11 @@ print </dev/null 2>&1 iptables -t mangle --delete-chain QOS-TOS >/dev/null 2>&1 rmmod sch_htb >/dev/null 2>&1 + + for i in \$(ls \$RRDLOG/class_*.rrd); do + rrdtool update \$i \$(date +%s): + done + echo "Quality of Service was successfully cleared!" ;; gen|generate) diff --git a/config/rootfiles/core/28/filelists/files b/config/rootfiles/core/28/filelists/files index f8b110abe7..31208c61ed 100644 --- a/config/rootfiles/core/28/filelists/files +++ b/config/rootfiles/core/28/filelists/files @@ -41,3 +41,4 @@ srv/web/ipfire/cgi-bin/ids.cgi usr/local/bin/backupiso usr/local/bin/updxsetperms var/ipfire/updatexlrator/bin/download +var/ipfire/qos/bin/makeqosscripts.pl diff --git a/config/rootfiles/core/28/update.sh b/config/rootfiles/core/28/update.sh old mode 100755 new mode 100644 index c7d1fd9fb1..a218dd289e --- a/config/rootfiles/core/28/update.sh +++ b/config/rootfiles/core/28/update.sh @@ -120,5 +120,10 @@ rm -rf /etc/sysconfig/lm_sensors # sed -i "s|$OLDVERSION|$NEWVERSION|g" /opt/pakfire/etc/pakfire.conf # +# Regenerate qos-scripts +[ -e /var/ipfire/qos/enable ] && /usr/local/bin/qosctrl stop +/usr/local/bin/qosctrl generate +[ -e /var/ipfire/qos/enable ] && /usr/local/bin/qosctrl start +# # This core-update need a reboot /usr/bin/logger -p syslog.emerg -t core-upgrade-28 "Upgrade finished. Please reboot... " diff --git a/src/initscripts/init.d/networking/red b/src/initscripts/init.d/networking/red index ded3f71c16..debb0d20c6 100644 --- a/src/initscripts/init.d/networking/red +++ b/src/initscripts/init.d/networking/red @@ -364,7 +364,7 @@ case "${1}" in /usr/bin/vnstat -u -i ppp0 -r --enable --force > /dev/null 2>&1 /etc/rc.d/init.d/connectd start # Add a NaN value to ppp0 rrd to supress spikes at reconnect - rrdtool $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrd \ + rrdtool update $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrd \ $(date +%s):: exit 0 fi @@ -423,7 +423,7 @@ case "${1}" in killall -w -s TERM /usr/sbin/pppd 2>/dev/null evaluate_retval # Add a NaN value to ppp0 rrd to supress spikes at reconnect - rrdtool $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrd \ + rrdtool update $RRDLOG/collectd/localhost/interface/if_octets-ppp0.rrd \ $(date +%s):: fi -- 2.39.2