/[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.3 - (hide annotations) (download)
Fri Dec 27 03:57:07 2019 UTC (4 years, 5 months ago) by jpp
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
FILE REMOVED
* Fri Dec 27 2019 Jean-Philipe Pialasse <tests@pialasse.com> 6.5-1.sme
- fix utf8 error
- fix ups not displaying [SME: 4449]
- fix broken image when DS not all available for ups, fan, temperature and voltage graphs

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

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