diff -Nur smeserver-sysmon-6.4.old/root/etc/e-smith/web/functions/sysmon smeserver-sysmon-6.4.new/root/etc/e-smith/web/functions/sysmon --- smeserver-sysmon-6.4.old/root/etc/e-smith/web/functions/sysmon 2015-09-25 15:44:06.650294302 +0200 +++ smeserver-sysmon-6.4.new/root/etc/e-smith/web/functions/sysmon 2015-09-25 20:03:10.188978519 +0200 @@ -305,13 +305,13 @@ $IFACE_GRAPH = "-b '1024' -l '0' "; $IFACE_GRAPH = "-t 'Ethernet Traffic ()' "; -$IFACE_GRAPH .= "-v 'b/s' "; -$IFACE_GRAPH .= "'DEF:minbin=$RRDDIR/$IFACEFILE.rrd:rxbyt:MIN' "; -$IFACE_GRAPH .= "'DEF:avgbin=$RRDDIR/$IFACEFILE.rrd:rxbyt:AVERAGE' "; -$IFACE_GRAPH .= "'DEF:maxbin=$RRDDIR/$IFACEFILE.rrd:rxbyt:MAX' "; -$IFACE_GRAPH .= "'DEF:minbout=$RRDDIR/$IFACEFILE.rrd:txbyt:MIN' "; -$IFACE_GRAPH .= "'DEF:avgbout=$RRDDIR/$IFACEFILE.rrd:txbyt:AVERAGE' "; -$IFACE_GRAPH .= "'DEF:maxbout=$RRDDIR/$IFACEFILE.rrd:txbyt:MAX' "; +$IFACE_GRAPH .= "-v 'kB/s' "; +$IFACE_GRAPH .= "'DEF:minbin=$RRDDIR/$IFACEFILE.rrd:rxkB:MIN' "; +$IFACE_GRAPH .= "'DEF:avgbin=$RRDDIR/$IFACEFILE.rrd:rxkB:AVERAGE' "; +$IFACE_GRAPH .= "'DEF:maxbin=$RRDDIR/$IFACEFILE.rrd:rxkB:MAX' "; +$IFACE_GRAPH .= "'DEF:minbout=$RRDDIR/$IFACEFILE.rrd:txkB:MIN' "; +$IFACE_GRAPH .= "'DEF:avgbout=$RRDDIR/$IFACEFILE.rrd:txkB:AVERAGE' "; +$IFACE_GRAPH .= "'DEF:maxbout=$RRDDIR/$IFACEFILE.rrd:txkB:MAX' "; $IFACE_GRAPH .= "'CDEF:diffbin=maxbin,avgbin,-' "; $IFACE_GRAPH .= "'COMMENT: ' "; $IFACE_GRAPH .= "'AREA:avgbin#00FF00:Inbound' "; @@ -321,16 +321,16 @@ $IFACE_GRAPH .= "<'LINE1:maxbout#000080: '> "; $IFACE_GRAPH .= "'COMMENT:\\n' "; $IFACE_GRAPH .= "'COMMENT: Max\\: ' "; -$IFACE_GRAPH .= "'GPRINT:maxbin:MAX:%6.2lf %sb/s' "; -$IFACE_GRAPH .= "'GPRINT:maxbout:MAX:< > %6.2lf %sb/s' "; +$IFACE_GRAPH .= "'GPRINT:maxbin:MAX:%6.2lf %skB/s' "; +$IFACE_GRAPH .= "'GPRINT:maxbout:MAX:< > %6.2lf %skB/s' "; $IFACE_GRAPH .= "'COMMENT:\\n' "; $IFACE_GRAPH .= "'COMMENT: Avg\\: ' "; -$IFACE_GRAPH .= "'GPRINT:avgbin:AVERAGE:%6.2lf %sb/s' "; -$IFACE_GRAPH .= "'GPRINT:avgbout:AVERAGE:< > %6.2lf %sb/s' "; +$IFACE_GRAPH .= "'GPRINT:avgbin:AVERAGE:%6.2lf %skB/s' "; +$IFACE_GRAPH .= "'GPRINT:avgbout:AVERAGE:< > %6.2lf %skB/s' "; $IFACE_GRAPH .= "'COMMENT:\\n' "; $IFACE_GRAPH .= "'COMMENT:Last\\: ' "; -$IFACE_GRAPH .= "'GPRINT:avgbin:LAST:%6.2lf %sb/s' "; -$IFACE_GRAPH .= "'GPRINT:avgbout:LAST:< > %6.2lf %sb/s' "; +$IFACE_GRAPH .= "'GPRINT:avgbin:LAST:%6.2lf %skB/s' "; +$IFACE_GRAPH .= "'GPRINT:avgbout:LAST:< > %6.2lf %skB/s' "; $IFACE_MAX = 'week month year'; $VOLTAGE_GRAPH = "-b '1000' "; diff -Nur smeserver-sysmon-6.4.old/root/usr/sbin/sysmon smeserver-sysmon-6.4.new/root/usr/sbin/sysmon --- smeserver-sysmon-6.4.old/root/usr/sbin/sysmon 2015-09-25 15:44:06.650294302 +0200 +++ smeserver-sysmon-6.4.new/root/usr/sbin/sysmon 2015-09-25 16:58:35.650264695 +0200 @@ -87,7 +87,7 @@ if(/(all|cpu\d+)\s+\%(user|nice|system|iowait|idle)\s+([0-9,.]+)/) { $datahash->{$2}->{$1}=$3/100; } if(/(runq-sz|plist-sz|ldavg-[15]+)\s+([0-9,.]+)/) { $datahash->{$1}=$2; } if(/kb(memfree|memused|buffers|cached|swpfree|swpused)\s+([0-9,.]+)/) { $datahash->{$1}=$2*1024; } - if(/(\w+)\s+(rxbyt|txbyt|rxpck|txpck)\/s\s+([0-9,.]+)/) { $datahash->{$2}->{$1}=$3; } + if(/(\w+)\s+(rxkB|txkB|rxpck|txpck)\/s\s+([0-9,.]+)/) { $datahash->{$2}->{$1}=$3; } } foreach (keys %{$datahash->{idle}}) { @@ -205,13 +205,13 @@ print RRDs::error . "\n" if (RRDs::error); } - foreach my $iface (keys %{$datahash->{rxbyt}}) { + foreach my $iface (keys %{$datahash->{rxkB}}) { next if ($iface =~ /(lo|br\d+|imq\d+)$/); - next if ($datahash->{rxbyt}->{$iface} == 0); + next if ($datahash->{rxkB}->{$iface} == 0); next if ($badifaces =~ /$iface/); RRDs::create("/var/lib/rrd/iface_$iface.rrd","-s","60", - "DS:rxbyt:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U", - "DS:txbyt:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U", + "DS:rxkB:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U", + "DS:txkB:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U", "DS:rxpck:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U", "DS:txpck:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U", "RRA:MIN:0.5:1:1500", @@ -230,7 +230,7 @@ "RRA:MAX:0.5:120:775", "RRA:MAX:0.5:1440:797") unless -e "/var/lib/rrd/iface_$iface.rrd"; RRDs::update("/var/lib/rrd/iface_$iface.rrd", - "N:$datahash->{rxbyt}->{$iface}:$datahash->{txbyt}->{$iface}:$datahash->{rxpck}->{$iface}:" . + "N:$datahash->{rxkB}->{$iface}:$datahash->{txkB}->{$iface}:$datahash->{rxpck}->{$iface}:" . "$datahash->{txpck}->{$iface}"); rename("/var/lib/rrd/iface_$iface.rrd","/var/lib/rrd/iface_$iface.bad") if(RRDs::error); print RRDs::error . "\n" if (RRDs::error);