]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Fix spikes in qos-graphs
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 17 May 2009 17:58:27 +0000 (19:58 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 17 May 2009 17:58:27 +0000 (19:58 +0200)
config/qos/makeqosscripts.pl
config/rootfiles/core/28/filelists/files
config/rootfiles/core/28/update.sh [changed mode: 0755->0644]
src/initscripts/init.d/networking/red

index a374a383bb111b02ccadc5bd3b28332a744e2453..94b53a46634c90eacfdd2afd9af9ca87ddbfe57b 100644 (file)
@@ -111,6 +111,11 @@ print <<END
 # RED INTERFACE:       $qossettings{'RED_DEV'}
 # IMQ DEVICE:          $qossettings{'IMQ_DEV'}
 
 # RED INTERFACE:       $qossettings{'RED_DEV'}
 # IMQ DEVICE:          $qossettings{'IMQ_DEV'}
 
+eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
+if [ "$RRDLOG" == "" ]; then
+       RRDLOG=/var/log/rrd
+fi
+
 case "\$1" in
 
   status)
 case "\$1" in
 
   status)
@@ -663,6 +668,10 @@ print <<END
        ( sleep 10 && /usr/local/bin/qosd $qossettings{'RED_DEV'} >/dev/null 2>&1) &
        ( sleep 10 && /usr/local/bin/qosd $qossettings{'IMQ_DEV'} >/dev/null 2>&1) &
 
        ( sleep 10 && /usr/local/bin/qosd $qossettings{'RED_DEV'} >/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
   ;;
        echo "Quality of Service was successfully started!"
        exit 0
   ;;
@@ -692,6 +701,11 @@ print <<END
        iptables -t mangle --flush  QOS-TOS >/dev/null 2>&1
        iptables -t mangle --delete-chain QOS-TOS >/dev/null 2>&1
        rmmod sch_htb >/dev/null 2>&1
        iptables -t mangle --flush  QOS-TOS >/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)
        echo "Quality of Service was successfully cleared!"
   ;;
   gen|generate)
index f8b110abe77df3558dfb3c3795a42e4c9f09451e..31208c61edfc7053b164a53c3f8a78f8864ea8d2 100644 (file)
@@ -41,3 +41,4 @@ srv/web/ipfire/cgi-bin/ids.cgi
 usr/local/bin/backupiso
 usr/local/bin/updxsetperms
 var/ipfire/updatexlrator/bin/download
 usr/local/bin/backupiso
 usr/local/bin/updxsetperms
 var/ipfire/updatexlrator/bin/download
+var/ipfire/qos/bin/makeqosscripts.pl
old mode 100755 (executable)
new mode 100644 (file)
index c7d1fd9..a218dd2
@@ -120,5 +120,10 @@ rm -rf /etc/sysconfig/lm_sensors
 #
 sed -i "s|$OLDVERSION|$NEWVERSION|g" /opt/pakfire/etc/pakfire.conf
 #
 #
 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... "
 # This core-update need a reboot
 /usr/bin/logger -p syslog.emerg -t core-upgrade-28 "Upgrade finished. Please reboot... "
index ded3f71c16f39f51b5470bb030b0a8d9cd57fda6..debb0d20c6d33401198ba0963bc964d2c4c4d35d 100644 (file)
@@ -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
                        /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
                                $(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
                        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
 
                                $(date +%s)::
                fi