/[smecontribs]/rpms/smeserver-sysmon/contribs9/smeserver-sysmon-6.4.change_rrd_network_label.patch
ViewVC logotype

Annotation of /rpms/smeserver-sysmon/contribs9/smeserver-sysmon-6.4.change_rrd_network_label.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Fri Sep 25 15:56:55 2015 UTC (8 years, 8 months ago) by stephdl
Branch: MAIN
CVS Tags: smeserver-sysmon-6_4-3_el6_sme
* Thu Sep 24 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 6.4-3.sme
- Network labels have changed in rrdtools
- Added smeserver-sysmon-6.4.change_rrd_network_label.patch

1 stephdl 1.1 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
2     --- smeserver-sysmon-6.4.old/root/etc/e-smith/web/functions/sysmon 2015-09-25 15:44:06.650294302 +0200
3     +++ smeserver-sysmon-6.4.new/root/etc/e-smith/web/functions/sysmon 2015-09-25 17:03:47.300786002 +0200
4     @@ -306,12 +306,12 @@
5     $IFACE_GRAPH = "-b '1024' -l '0' ";
6     $IFACE_GRAPH = "-t 'Ethernet Traffic (<D>)' ";
7     $IFACE_GRAPH .= "-v 'b/s' ";
8     -$IFACE_GRAPH .= "'DEF:minbin=$RRDDIR/$IFACEFILE<D>.rrd:rxbyt:MIN' ";
9     -$IFACE_GRAPH .= "'DEF:avgbin=$RRDDIR/$IFACEFILE<D>.rrd:rxbyt:AVERAGE' ";
10     -$IFACE_GRAPH .= "'DEF:maxbin=$RRDDIR/$IFACEFILE<D>.rrd:rxbyt:MAX' ";
11     -$IFACE_GRAPH .= "'DEF:minbout=$RRDDIR/$IFACEFILE<D>.rrd:txbyt:MIN' ";
12     -$IFACE_GRAPH .= "'DEF:avgbout=$RRDDIR/$IFACEFILE<D>.rrd:txbyt:AVERAGE' ";
13     -$IFACE_GRAPH .= "'DEF:maxbout=$RRDDIR/$IFACEFILE<D>.rrd:txbyt:MAX' ";
14     +$IFACE_GRAPH .= "'DEF:minbin=$RRDDIR/$IFACEFILE<D>.rrd:rxkB:MIN' ";
15     +$IFACE_GRAPH .= "'DEF:avgbin=$RRDDIR/$IFACEFILE<D>.rrd:rxkB:AVERAGE' ";
16     +$IFACE_GRAPH .= "'DEF:maxbin=$RRDDIR/$IFACEFILE<D>.rrd:rxkB:MAX' ";
17     +$IFACE_GRAPH .= "'DEF:minbout=$RRDDIR/$IFACEFILE<D>.rrd:txkB:MIN' ";
18     +$IFACE_GRAPH .= "'DEF:avgbout=$RRDDIR/$IFACEFILE<D>.rrd:txkB:AVERAGE' ";
19     +$IFACE_GRAPH .= "'DEF:maxbout=$RRDDIR/$IFACEFILE<D>.rrd:txkB:MAX' ";
20     $IFACE_GRAPH .= "'CDEF:diffbin=maxbin,avgbin,-' ";
21     $IFACE_GRAPH .= "'COMMENT: ' ";
22     $IFACE_GRAPH .= "'AREA:avgbin#00FF00:Inbound' ";
23     diff -Nur smeserver-sysmon-6.4.old/root/usr/sbin/sysmon smeserver-sysmon-6.4.new/root/usr/sbin/sysmon
24     --- smeserver-sysmon-6.4.old/root/usr/sbin/sysmon 2015-09-25 15:44:06.650294302 +0200
25     +++ smeserver-sysmon-6.4.new/root/usr/sbin/sysmon 2015-09-25 16:58:35.650264695 +0200
26     @@ -87,7 +87,7 @@
27     if(/(all|cpu\d+)\s+\%(user|nice|system|iowait|idle)\s+([0-9,.]+)/) { $datahash->{$2}->{$1}=$3/100; }
28     if(/(runq-sz|plist-sz|ldavg-[15]+)\s+([0-9,.]+)/) { $datahash->{$1}=$2; }
29     if(/kb(memfree|memused|buffers|cached|swpfree|swpused)\s+([0-9,.]+)/) { $datahash->{$1}=$2*1024; }
30     - if(/(\w+)\s+(rxbyt|txbyt|rxpck|txpck)\/s\s+([0-9,.]+)/) { $datahash->{$2}->{$1}=$3; }
31     + if(/(\w+)\s+(rxkB|txkB|rxpck|txpck)\/s\s+([0-9,.]+)/) { $datahash->{$2}->{$1}=$3; }
32     }
33    
34     foreach (keys %{$datahash->{idle}}) {
35     @@ -205,13 +205,13 @@
36     print RRDs::error . "\n" if (RRDs::error);
37     }
38    
39     - foreach my $iface (keys %{$datahash->{rxbyt}}) {
40     + foreach my $iface (keys %{$datahash->{rxkB}}) {
41     next if ($iface =~ /(lo|br\d+|imq\d+)$/);
42     - next if ($datahash->{rxbyt}->{$iface} == 0);
43     + next if ($datahash->{rxkB}->{$iface} == 0);
44     next if ($badifaces =~ /$iface/);
45     RRDs::create("/var/lib/rrd/iface_$iface.rrd","-s","60",
46     - "DS:rxbyt:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U",
47     - "DS:txbyt:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U",
48     + "DS:rxkB:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U",
49     + "DS:txkB:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U",
50     "DS:rxpck:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U",
51     "DS:txpck:" . ($iface =~ /^sw/ ? "COUNTER" : "GAUGE" ) . ":120:0:U",
52     "RRA:MIN:0.5:1:1500",
53     @@ -230,7 +230,7 @@
54     "RRA:MAX:0.5:120:775",
55     "RRA:MAX:0.5:1440:797") unless -e "/var/lib/rrd/iface_$iface.rrd";
56     RRDs::update("/var/lib/rrd/iface_$iface.rrd",
57     - "N:$datahash->{rxbyt}->{$iface}:$datahash->{txbyt}->{$iface}:$datahash->{rxpck}->{$iface}:" .
58     + "N:$datahash->{rxkB}->{$iface}:$datahash->{txkB}->{$iface}:$datahash->{rxpck}->{$iface}:" .
59     "$datahash->{txpck}->{$iface}");
60     rename("/var/lib/rrd/iface_$iface.rrd","/var/lib/rrd/iface_$iface.bad") if(RRDs::error);
61     print RRDs::error . "\n" if (RRDs::error);

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed