1 diff -ur munin-2.0.65.orig/plugins/node.d/amavis.in munin-2.0.65/plugins/node.d/amavis.in
2 --- munin-2.0.65.orig/plugins/node.d/amavis.in 2020-10-28 22:36:02.000000000 +0100
3 +++ munin-2.0.65/plugins/node.d/amavis.in 2021-01-04 17:53:09.637969144 +0100
6 AMAVIS_LOG=${amavislog:-/var/log/mail/mail.info}
7 LOGTAIL=${logtail:-logtail}
8 -STATEFILE=$MUNIN_PLUGSTATE/amavis.offset
9 +STATEFILE=@@PLUGSTATE@@/amavis.offset
11 if [ "$1" = "autoconf" ]; then
12 if [ -f "${AMAVIS_LOG}" ] && [ -n "${LOGTAIL}" ] && [ -x "${LOGTAIL}" ] ; then
15 if [ "$1" = "config" ]; then
16 echo 'graph_title Amavis filter statistics'
17 - echo 'graph_vlabel \#'
18 + echo 'graph_vlabel mails'
19 echo 'graph_category antivirus'
20 echo 'virus.label virus'
21 echo 'virus.info Number of viruses caught in email'
26 -TEMP_FILE=$(@@MKTEMP@@ munin-amavis.XXXXXX)
27 +TEMP_FILE=$(@@MKTEMP@@ munin-amavis.XXXXXXXXXX)
29 if [ -n "$TEMP_FILE" ] && [ -f "$TEMP_FILE" ]; then
30 if [ "$ARGS" != 0 ]; then
31 diff -ur munin-2.0.65.orig/plugins/node.d/apache_accesses.in munin-2.0.65/plugins/node.d/apache_accesses.in
32 --- munin-2.0.65.orig/plugins/node.d/apache_accesses.in 2020-10-28 22:36:02.000000000 +0100
33 +++ munin-2.0.65/plugins/node.d/apache_accesses.in 2021-01-04 17:53:09.638969144 +0100
36 my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://127.0.0.1:%d/server-status?auto";
37 my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80);
38 +my $HOST = exists $ENV{'host'} ? $ENV{'host'} : undef;
41 # Convert an URL with the %d placeholder into a string. Allow URL without placeholder.
44 if ( defined $ARGV[0] and $ARGV[0] eq "config" )
46 - print "graph_title Apache accesses\n";
47 + print "graph_title Apache accesses";
52 print "graph_args --base 1000\n";
53 print "graph_vlabel accesses / \${graph_period}\n";
54 print "graph_category apache\n";
55 diff -ur munin-2.0.65.orig/plugins/node.d/apache_processes.in munin-2.0.65/plugins/node.d/apache_processes.in
56 --- munin-2.0.65.orig/plugins/node.d/apache_processes.in 2020-10-28 22:36:02.000000000 +0100
57 +++ munin-2.0.65/plugins/node.d/apache_processes.in 2021-01-04 17:53:09.638969144 +0100
60 my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://127.0.0.1:%d/server-status?auto";
61 my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80);
62 +my $HOST = exists $ENV{'host'} ? $ENV{'host'} : undef;
63 my $SHOWFREE = !exists $ENV{'showfree'} || $ENV{'showfree'};
68 if ( defined $ARGV[0] and $ARGV[0] eq "config" )
70 - print "graph_title Apache processes\n";
71 + print "graph_title Apache processes";
76 print "graph_args --base 1000 -l 0\n";
77 print "graph_category apache\n";
79 diff -ur munin-2.0.65.orig/plugins/node.d/apache_volume.in munin-2.0.65/plugins/node.d/apache_volume.in
80 --- munin-2.0.65.orig/plugins/node.d/apache_volume.in 2020-10-28 22:36:02.000000000 +0100
81 +++ munin-2.0.65/plugins/node.d/apache_volume.in 2021-01-04 17:53:09.639969144 +0100
84 my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://127.0.0.1:%d/server-status?auto";
85 my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80);
86 +my $HOST = exists $ENV{'host'} ? $ENV{'host'} : undef;
89 # Convert an URL with the %d placeholder into a string. Allow URL without placeholder.
92 if ( defined $ARGV[0] and $ARGV[0] eq "config" )
94 - print "graph_title Apache volume\n";
95 + print "graph_title Apache volume";
100 print "graph_args --base 1000\n";
101 print "graph_vlabel bytes per \${graph_period}\n";
102 print "graph_category apache\n";
103 diff -ur munin-2.0.65.orig/plugins/node.d/bind9.in munin-2.0.65/plugins/node.d/bind9.in
104 --- munin-2.0.65.orig/plugins/node.d/bind9.in 2020-10-28 22:36:02.000000000 +0100
105 +++ munin-2.0.65/plugins/node.d/bind9.in 2021-01-04 17:53:09.639969144 +0100
109 my $QUERYLOG = $ENV{logfile} || '/var/log/bind9/query.log';
110 -my $STATEFILE= "$ENV{MUNIN_PLUGSTATE}/bind9.state";
111 +my $STATEFILE= "@@PLUGSTATE@@/bind9.state";
116 open(Q, ">", $STATEFILE);
119 - open(Q,"< $STATEFILE") or die ("Cannot open state file");
120 + open(Q,"< $STATEFILE") or return ("Cannot open state file");
123 my ($q,$n) = split(/\s+/,$_,2);
124 diff -ur munin-2.0.65.orig/plugins/node.d/courier_.in munin-2.0.65/plugins/node.d/courier_.in
125 --- munin-2.0.65.orig/plugins/node.d/courier_.in 2020-10-28 22:36:02.000000000 +0100
126 +++ munin-2.0.65/plugins/node.d/courier_.in 2021-01-04 17:53:09.639969144 +0100
128 COURIER_LOG=${logfile:-/var/log/mail.log}
129 SERVICE=${service:-$(basename "$0" | sed 's/^courier_//g')}
130 OFFSET_FILE=${MUNIN_PLUGSTATE}/courier_${SERVICE}.offset
131 -LOGTAIL=${logtail:-/usr/sbin/logtail}
132 +LOGTAIL=${logtail:-`which logtail`}
136 diff -ur munin-2.0.65.orig/plugins/node.d/courier_mta_mailstats.in munin-2.0.65/plugins/node.d/courier_mta_mailstats.in
137 --- munin-2.0.65.orig/plugins/node.d/courier_mta_mailstats.in 2020-10-28 22:36:02.000000000 +0100
138 +++ munin-2.0.65/plugins/node.d/courier_mta_mailstats.in 2021-01-04 17:53:09.639969144 +0100
141 if($startsize < $pos) {
143 - parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
144 + if (-f $rotlogfile) {
145 + parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
150 diff -ur munin-2.0.65.orig/plugins/node.d/courier_mta_mailvolume.in munin-2.0.65/plugins/node.d/courier_mta_mailvolume.in
151 --- munin-2.0.65.orig/plugins/node.d/courier_mta_mailvolume.in 2020-10-28 22:36:02.000000000 +0100
152 +++ munin-2.0.65/plugins/node.d/courier_mta_mailvolume.in 2021-01-04 17:53:09.639969144 +0100
155 if($startsize < $pos) {
157 - parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
158 + if (-f $rotlogfile) {
159 + parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
164 diff -ur munin-2.0.65.orig/plugins/node.d/cupsys_pages.in munin-2.0.65/plugins/node.d/cupsys_pages.in
165 --- munin-2.0.65.orig/plugins/node.d/cupsys_pages.in 2020-10-28 22:36:02.000000000 +0100
166 +++ munin-2.0.65/plugins/node.d/cupsys_pages.in 2021-01-04 17:53:09.640969144 +0100
169 if ($startsize < $pos) {
171 - parselogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
172 + if (-f $rotlogfile) {
173 + parselogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
179 while (tell(LOGFILE) < $stop) {
180 my $line = <LOGFILE>;
182 - if ($line =~ /^(\S+)\s+\S+\s+\d+\s+\[[^\]]+\]\s+(\d+)\s+(\d+)\s+(\S+)\s+(\S+)/) {
183 + if ($line =~ /^(\S+)\s+\S+\s+\S+\s+\[[^\]]+\]\s+(\d+)\s+(\d+)\s+(.+)$/) {
184 if(!defined($printers{$1}) && keys(%printers) < $MAXLABEL) {
185 $printers{$1} += int($2)*int($3);
186 } elsif(defined($printers{$1})) {
187 diff -ur munin-2.0.65.orig/plugins/node.d/foldingathome_rank.in munin-2.0.65/plugins/node.d/foldingathome_rank.in
188 --- munin-2.0.65.orig/plugins/node.d/foldingathome_rank.in 2020-10-28 22:36:02.000000000 +0100
189 +++ munin-2.0.65/plugins/node.d/foldingathome_rank.in 2021-01-04 17:53:09.640969144 +0100
194 -statefile=$MUNIN_PLUGSTATE/plugin-fah_rank.state
195 +statefile=@@PLUGSTATE@@/plugin-fah_rank.state
197 if [ "$1" = "config" ]; then
198 echo 'graph_title Folding@Home Rank'
199 diff -ur munin-2.0.65.orig/plugins/node.d/mailman.in munin-2.0.65/plugins/node.d/mailman.in
200 --- munin-2.0.65.orig/plugins/node.d/mailman.in 2020-10-28 22:36:02.000000000 +0100
201 +++ munin-2.0.65/plugins/node.d/mailman.in 2021-01-04 17:53:09.640969144 +0100
204 $logfile = $ENV{'logfile'} || "/var/log/mailman/post";
205 $libdir = $ENV{'libdir'} || "/var/lib/mailman";
206 -$lister = $ENV{'lister'} || "/usr/lib/mailman/bin/list_members";
207 +$lister = $ENV{'lister'} || {
208 + if (-f "/usr/lib64/mailman/bin/list_members") {
209 + $lister = "/usr/lib64/mailman/bin/list_members";
211 + $lister = "/usr/lib/mailman/bin/list_members";
217 diff -ur munin-2.0.65.orig/plugins/node.d/mysql_.in munin-2.0.65/plugins/node.d/mysql_.in
218 --- munin-2.0.65.orig/plugins/node.d/mysql_.in 2020-10-28 22:36:02.000000000 +0100
219 +++ munin-2.0.65/plugins/node.d/mysql_.in 2021-01-04 17:53:09.641969144 +0100
221 env.mysqlconnection DBI:mysql:information_schema;host=127.0.0.1;port=3306
223 env.mysqlpassword geheim
224 + env.mysqlnosuperpriv 1
225 env.cachenamespace munin_mysql_pri
227 env.mysqlconnection DBI:mysql:information_schema;host=127.0.0.1;port=13306
229 'user' => $ENV{'mysqluser'} || 'root',
230 'password' => $ENV{'mysqlpassword'} || '',
231 'cache_namespace' => $ENV{'cachenamespace'} || 'munin_mysql',
232 + 'nosuper' => $ENV{'mysqlnosuperpriv'} || 0,
236 @@ -1117,8 +1119,10 @@
237 update_variables($dbh);
238 update_plugins($dbh);
240 - update_master($dbh);
241 - update_slave($dbh);
242 + if (!$config{nosuper}) {
243 + update_master($dbh);
244 + update_slave($dbh);
247 $shared_memory_cache->set('data', $data);
248 $shared_memory_cache->set('graphs', nfreeze(\%graphs));
249 diff -ur munin-2.0.65.orig/plugins/node.d/mysql_innodb.in munin-2.0.65/plugins/node.d/mysql_innodb.in
250 --- munin-2.0.65.orig/plugins/node.d/mysql_innodb.in 2020-10-28 22:36:02.000000000 +0100
251 +++ munin-2.0.65/plugins/node.d/mysql_innodb.in 2021-01-04 17:53:09.641969144 +0100
258 diff -ur munin-2.0.65.orig/plugins/node.d/mysql_slowqueries.in munin-2.0.65/plugins/node.d/mysql_slowqueries.in
259 --- munin-2.0.65.orig/plugins/node.d/mysql_slowqueries.in 2020-10-28 22:36:02.000000000 +0100
260 +++ munin-2.0.65/plugins/node.d/mysql_slowqueries.in 2021-01-04 17:53:09.641969144 +0100
265 -/usr/bin/printf "queries.value "
266 +/bin/printf "queries.value "
267 # shellcheck disable=SC2086
268 ("$MYSQLADMIN" $MYSQLOPTS status 2>/dev/null || echo a a a a a a a a U) | awk '{print $9}'
269 diff -ur munin-2.0.65.orig/plugins/node.d/mysql_threads.in munin-2.0.65/plugins/node.d/mysql_threads.in
270 --- munin-2.0.65.orig/plugins/node.d/mysql_threads.in 2020-10-28 22:36:02.000000000 +0100
271 +++ munin-2.0.65/plugins/node.d/mysql_threads.in 2021-01-04 17:53:09.641969144 +0100
276 -/usr/bin/printf "threads.value "
277 +/bin/printf "threads.value "
278 # shellcheck disable=SC2086
279 ("$MYSQLADMIN" $MYSQLOPTS status 2>/dev/null || echo 'a a a U') | awk '{print $4}'
280 diff -ur munin-2.0.65.orig/plugins/node.d/ntp_.in munin-2.0.65/plugins/node.d/ntp_.in
281 --- munin-2.0.65.orig/plugins/node.d/ntp_.in 2020-10-28 22:36:02.000000000 +0100
282 +++ munin-2.0.65/plugins/node.d/ntp_.in 2021-01-04 17:57:57.057969144 +0100
284 if (!$has_requirements) {
285 print "no (missing Net::DNS or Net::IP modules)\n";
287 - `ntpq -c help >/dev/null 2>/dev/null`;
288 + `/usr/sbin/ntpq -c help >/dev/null 2>/dev/null`;
289 if ($CHILD_ERROR eq "0") {
290 - if (`ntpq -n -c peers | wc -l` > 0) {
291 + if (`/usr/sbin/ntpq -n -c peers | wc -l` > 0) {
294 print "no (ntpq -p returned no peers)\n";
298 if ($ARGV[0] and $ARGV[0] eq "suggest") {
299 - foreach my $line (`ntpq -c associations`) {
300 + foreach my $line (`/usr/sbin/ntpq -c associations`) {
301 if ($line =~ m/^\s*\d+/) {
302 my (undef, undef, $assid, undef, undef, undef, undef, undef, undef, undef) = split(/\s+/, $line);
303 - chomp(my $peerinfo = `ntpq -n -c "readvar $assid srcadr"`);
304 + chomp(my $peerinfo = `/usr/sbin/ntpq -n -c "readvar $assid srcadr"`);
305 $peerinfo =~ s/\R/ /g;
306 my ($peer_addr) = ($peerinfo =~ m/srcadr=(.*)/);
307 print $peer_addr, "\n" unless $peer_addr eq "0.0.0.0";
308 @@ -118,12 +118,12 @@
312 -my @associations = `ntpq -c associations`;
313 +my @associations = `/usr/sbin/ntpq -c associations`;
315 foreach my $line (@associations) {
316 if ($line =~ m/^\s*\d+/) {
317 my (undef, undef, $assid, undef, undef, undef, undef, undef, undef, undef) = split(/\s+/, $line);
318 - chomp(my $peerinfo = `ntpq -n -c "readvar $assid srcadr,delay,offset,jitter"`);
319 + chomp(my $peerinfo = `/usr/sbin/ntpq -n -c "readvar $assid srcadr,delay,offset,jitter"`);
320 $peerinfo =~ s/\R/ /g;
321 ($srcadr) = ($peerinfo =~ m/srcadr=([^, ]+)/);
322 ($delay) = ($peerinfo =~ m/delay=([^, ]+)/);
324 ASSOCS: foreach my $line (@associations) {
325 if ($line =~ m/^\s*\d+/) {
326 my (undef, undef, $assid, undef, undef, undef, undef, undef, undef, undef) = split(/\s+/, $line);
327 - chomp(my $peerinfo = `ntpq -n -c "readvar $assid srcadr,delay,offset,jitter"`);
328 + chomp(my $peerinfo = `/usr/sbin/ntpq -n -c "readvar $assid srcadr,delay,offset,jitter"`);
329 $peerinfo =~ s/\R/ /g;
330 ($srcadr) = ($peerinfo =~ m/srcadr=([^, ]+)/);
331 ($delay) = ($peerinfo =~ m/delay=([^, ]+)/);
332 diff -ur munin-2.0.65.orig/plugins/node.d/ntp_kernel_err.in munin-2.0.65/plugins/node.d/ntp_kernel_err.in
333 --- munin-2.0.65.orig/plugins/node.d/ntp_kernel_err.in 2020-10-28 22:36:02.000000000 +0100
334 +++ munin-2.0.65/plugins/node.d/ntp_kernel_err.in 2021-01-04 17:56:35.893969144 +0100
336 export PATH=/usr/local/sbin:$PATH
338 if [ "$1" = "autoconf" ]; then
339 - { ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
340 + { /usr/sbin/ntpq -c kerninfo; /usr/sbin/ntpdc -c kerninfo; } 2>/dev/null |
342 /^estimated error:/ { ev=0; }
343 END { if (ev == 0) { print "yes";} else { print "no (command ntpq or ntpdc not found)"; } exit 0; }'
346 printf 'ntp_err.value '
348 -ntpq_name=$(ntpq -c version | sed 's/[^[:alpha:]].*//')
349 -ntpq_version=$(ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]')
350 +ntpq_name=$(/usr/sbin/ntpq -c version | sed 's/[^[:alpha:]].*//')
351 +ntpq_version=$(/usr/sbin/ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]')
352 if [ "$ntpq_name" = "ntpq" ] && [ "$(echo "$ntpq_version" | tr -d '.')" -lt 427 ]; then
353 - ntpdc -c kerninfo | awk '/^estimated error:/ { printf("%.9f\n", $3) }'
354 + /usr/sbin/ntpdc -c kerninfo | awk '/^estimated error:/ { printf("%.9f\n", $3) }'
356 - ntpq -c kerninfo | awk '/^estimated error:/ { printf("%.9f\n", $3 / 1000) }'
357 + /usr/sbin/ntpq -c kerninfo | awk '/^estimated error:/ { printf("%.9f\n", $3 / 1000) }'
359 diff -ur munin-2.0.65.orig/plugins/node.d/ntp_kernel_pll_freq.in munin-2.0.65/plugins/node.d/ntp_kernel_pll_freq.in
360 --- munin-2.0.65.orig/plugins/node.d/ntp_kernel_pll_freq.in 2020-10-28 22:36:02.000000000 +0100
361 +++ munin-2.0.65/plugins/node.d/ntp_kernel_pll_freq.in 2021-01-04 17:55:34.045969144 +0100
363 export PATH=/usr/local/sbin:$PATH
365 if [ "$1" = "autoconf" ]; then
366 - { ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
367 + { /usr/sbin/ntpq -c kerninfo; /usr/sbin/ntpdc -c kerninfo; } 2>/dev/null |
369 /^pll frequency:/ { ev=0; }
370 END { if (ev == 0) { print "yes";} else { print "no (command ntpq or ntpdc not found)"; } exit 0; }'
373 printf 'ntp_pll_freq.value '
375 -ntpq_name=$(ntpq -c version | sed 's/[^[:alpha:]].*//')
376 -ntpq_version=$(ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]')
377 +ntpq_name=$(/usr/sbin/ntpq -c version | sed 's/[^[:alpha:]].*//')
378 +ntpq_version=$(/usr/sbin/ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]')
379 if [ "$ntpq_name" = "ntpq" ] && [ "$(echo "$ntpq_version" | tr -d '.')" -lt 427 ]; then
381 + cmd=/usr/sbin/ntpdc
387 "$cmd" -c kerninfo | awk -v "fcomp=$fcomp" '/^pll frequency:/ { printf("%.9f\n", $3 + fcomp) }'
388 diff -ur munin-2.0.65.orig/plugins/node.d/ntp_kernel_pll_off.in munin-2.0.65/plugins/node.d/ntp_kernel_pll_off.in
389 --- munin-2.0.65.orig/plugins/node.d/ntp_kernel_pll_off.in 2020-10-28 22:36:02.000000000 +0100
390 +++ munin-2.0.65/plugins/node.d/ntp_kernel_pll_off.in 2021-01-04 17:54:55.598969144 +0100
392 export PATH=/usr/local/sbin:$PATH
394 if [ "$1" = "autoconf" ]; then
395 - { ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
396 + { /usr/sbin/ntpq -c kerninfo; /usr/sbin/ntpdc -c kerninfo; } 2>/dev/null |
398 /^pll offset:/ { ev=0; }
399 END { if (ev == 0) { print "yes";} else { print "no (command ntpq or ntpdc not found)"; } exit 0; }'
402 printf 'ntp_pll_off.value '
404 -ntpq_name=$(ntpq -c version | sed 's/[^[:alpha:]].*//')
405 -ntpq_version=$(ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]')
406 +ntpq_name=$(/usr/sbin/ntpq -c version | sed 's/[^[:alpha:]].*//')
407 +ntpq_version=$(/usr/sbin/ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]')
408 if [ "$ntpq_name" = "ntpq" ] && [ "$(echo "$ntpq_version" | tr -d '.')" -lt 427 ]; then
409 - ntpdc -c kerninfo | awk '/^pll offset:/ { printf("%.9f\n", $3) }'
410 + /usr/sbin/ntpdc -c kerninfo | awk '/^pll offset:/ { printf("%.9f\n", $3) }'
412 - ntpq -c kerninfo | awk '/^pll offset:/ { printf("%.9f\n", $3 / 1000) }'
413 + /usr/sbin/ntpq -c kerninfo | awk '/^pll offset:/ { printf("%.9f\n", $3 / 1000) }'
415 diff -ur munin-2.0.65.orig/plugins/node.d/ntp_offset.in munin-2.0.65/plugins/node.d/ntp_offset.in
416 --- munin-2.0.65.orig/plugins/node.d/ntp_offset.in 2020-10-28 22:36:02.000000000 +0100
417 +++ munin-2.0.65/plugins/node.d/ntp_offset.in 2021-01-04 17:53:09.693969144 +0100
422 - ntpq -c help >/dev/null 2>&1 || { echo 'no (no ntpq program)'; exit 0; }
423 + /usr/sbin/ntpq -c help >/dev/null 2>&1 || { echo 'no (no ntpq program)'; exit 0; }
425 - case "$(ntpq -n -p 2>/dev/null | wc -l)" in
426 + case "$(/usr/sbin/ntpq -n -p 2>/dev/null | wc -l)" in
428 echo 'no (unable to list peers)'
434 - syspeer="$(ntpq -n -p | grep '^[*o]')"
435 + syspeer="$(/usr/sbin/ntpq -n -p | grep '^[*o]')"
437 # shellcheck disable=SC2086
443 - syspeer="$(ntpq -n -p | grep '^[*o]')"
444 + syspeer="$(/usr/sbin/ntpq -n -p | grep '^[*o]')"
446 # shellcheck disable=SC2086
448 diff -ur munin-2.0.65.orig/plugins/node.d/ntp_states.in munin-2.0.65/plugins/node.d/ntp_states.in
449 --- munin-2.0.65.orig/plugins/node.d/ntp_states.in 2020-10-28 22:36:02.000000000 +0100
450 +++ munin-2.0.65/plugins/node.d/ntp_states.in 2021-01-04 17:55:58.249969144 +0100
453 print "no (missing perl module Net::DNS)\n";
455 - `ntpq -c help >/dev/null 2>/dev/null`;
456 + `/usr/sbin/ntpq -c help >/dev/null 2>/dev/null`;
457 if ($CHILD_ERROR eq "0") {
458 - if (`ntpq -n -c peers | wc -l` > 0) {
459 + if (`/usr/sbin/ntpq -n -c peers | wc -l` > 0) {
462 print "no (ntpq -p returned no peers)\n";
464 # 1 63933 931a yes yes none outlier sys_peer 1
465 # 2 63934 943a yes yes none candidate sys_peer 3
467 - foreach my $line (`ntpq -c associations`) {
468 + foreach my $line (`/usr/sbin/ntpq -c associations`) {
469 if ($line =~ m/^\s*\d+/) {
470 my (undef, undef, $assid, undef, undef, undef, undef, $condition_str, undef, undef) = split(/\s+/, $line);
471 - chomp(my $peerinfo = `ntpq -n -c "readvar $assid srcadr"`);
472 + chomp(my $peerinfo = `/usr/sbin/ntpq -n -c "readvar $assid srcadr"`);
473 $peerinfo =~ s/\s//g;
474 my ($peer_addr) = ($peerinfo =~ m/srcadr=(.*)/);
476 diff -ur munin-2.0.65.orig/plugins/node.d/nut_misc.in munin-2.0.65/plugins/node.d/nut_misc.in
477 --- munin-2.0.65.orig/plugins/node.d/nut_misc.in 2020-10-28 22:36:02.000000000 +0100
478 +++ munin-2.0.65/plugins/node.d/nut_misc.in 2021-01-04 17:53:09.694969144 +0100
483 - upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha@127.0.0.1',
484 + upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha',
485 + upshost => $ENV{"upshost"} ? $ENV{"upshost"} : '127.0.0.1',
486 upsc => $ENV{"upsc"} ? $ENV{"upsc"} : 'upsc'
493 - 'battery_voltage' => {
494 - label => 'batt voltage - V',
498 'battery_runtime' => {
499 label => 'runtime - min',
504 if ( defined $ARGV[0] and $ARGV[0] eq 'config' ) {
505 - print "graph_title UPS Misc - $config{upsname}\n";
506 + my $s = $config{upsname};
508 + if ($config{upshost} ne "127.0.0.1" && $config{upshost} ne "localhost") {
509 + $s .= " at $config{upshost}";
511 + print "graph_title UPS Misc - $s\n";
512 #print "graph_args -l 110\n";
513 #print "graph_vlabel Misc\n";
514 foreach my $key (keys %graph) {
519 - my $data = `$config{upsc} $config{upsname}`;
520 + my $data = `$config{upsc} $config{upsname}\@$config{upshost}`;
521 while ($data =~ /([a-z.]+): (.+)\b/g) {
524 diff -ur munin-2.0.65.orig/plugins/node.d/nut_volts.in munin-2.0.65/plugins/node.d/nut_volts.in
525 --- munin-2.0.65.orig/plugins/node.d/nut_volts.in 2020-10-28 22:36:02.000000000 +0100
526 +++ munin-2.0.65/plugins/node.d/nut_volts.in 2021-01-04 17:53:09.694969144 +0100
531 - upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha@127.0.0.1',
532 + upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha',
533 + upshost => $ENV{"upshost"} ? $ENV{"upshost"} : '127.0.0.1',
534 upsc => $ENV{"upsc"} ? $ENV{"upsc"} : 'upsc'
541 - 'input_voltage_maximum' => {
542 - label => 'max input seen',
546 - 'input_voltage_minimum' => {
547 - label => 'min input seen',
551 'output_voltage' => {
557 if ( defined $ARGV[0] and $ARGV[0] eq 'config' ) {
558 - print "graph_title UPS Voltages - $config{upsname}\n";
559 + my $s = $config{upsname};
561 + if ($config{upshost} ne "127.0.0.1" && $config{upshost} ne "localhost") {
562 + $s .= " at $config{upshost}";
564 + print "graph_title UPS Voltages - $s\n";
565 print "graph_args -l 115\n";
566 print "graph_vlabel Volts\n";
567 foreach my $key (keys %graph) {
572 - my $data = `$config{upsc} $config{upsname}`;
573 + my $data = `$config{upsc} $config{upsname}\@$config{upshost}`;
574 while ($data =~ /([a-z.]+): (.+)\b/g) {
577 diff -ur munin-2.0.65.orig/plugins/node.d/perdition.in munin-2.0.65/plugins/node.d/perdition.in
578 --- munin-2.0.65.orig/plugins/node.d/perdition.in 2020-10-28 22:36:02.000000000 +0100
579 +++ munin-2.0.65/plugins/node.d/perdition.in 2021-01-04 17:53:09.695969144 +0100
581 # Set the location of the perdition logs
582 PERDITION_LOG=${logfile:-/var/log/perdition.log}
583 OFFSET_FILE=${MUNIN_PLUGSTATE}/perdition.offset
584 -LOGTAIL=${logtail:-/usr/sbin/logtail}
585 +LOGTAIL=${logtail:-`which logtail`}
589 diff -ur munin-2.0.65.orig/plugins/node.d/pop_stats.in munin-2.0.65/plugins/node.d/pop_stats.in
590 --- munin-2.0.65.orig/plugins/node.d/pop_stats.in 2020-10-28 22:36:02.000000000 +0100
591 +++ munin-2.0.65/plugins/node.d/pop_stats.in 2021-01-04 17:53:09.695969144 +0100
593 if ($startsize < $pos)
596 - parseEximfile ($pop{'rotlogfile'}, $pos, (stat $pop{'rotlogfile'})[7]);
597 + if (-f $pop{'rotlogfile'}) {
598 + parseEximfile ($pop{'rotlogfile'}, $pos, (stat $pop{'rotlogfile'})[7]);
603 diff -ur munin-2.0.65.orig/plugins/node.d/postgres_scans_.in munin-2.0.65/plugins/node.d/postgres_scans_.in
604 --- munin-2.0.65.orig/plugins/node.d/postgres_scans_.in 2020-10-28 22:36:02.000000000 +0100
605 +++ munin-2.0.65/plugins/node.d/postgres_scans_.in 2021-01-04 17:53:09.695969144 +0100
607 vlabel => 'Scans / sec',
609 "SELECT COALESCE(sum(seq_scan),0) AS sequential, COALESCE(sum(idx_scan),0) AS index FROM pg_stat_user_tables",
610 - paramdatabase => 1,
613 "VALUES ('sequential','Sequential scans'), ('index','Index scans')",
614 diff -ur munin-2.0.65.orig/plugins/node.d/postgres_tuples_.in munin-2.0.65/plugins/node.d/postgres_tuples_.in
615 --- munin-2.0.65.orig/plugins/node.d/postgres_tuples_.in 2020-10-28 22:36:02.000000000 +0100
616 +++ munin-2.0.65/plugins/node.d/postgres_tuples_.in 2021-01-04 17:53:09.695969144 +0100
618 . " COALESCE(sum(n_tup_del),0) AS deleted FROM pg_stat_user_tables",
621 - paramdatabase => 1,
624 "VALUES ('seqread','Tuples sequentally read'), ('idxfetch','Tuples index fetched'), ('inserted','Tuples inserted'),"
625 diff -ur munin-2.0.65.orig/plugins/node.d/slapd_.in munin-2.0.65/plugins/node.d/slapd_.in
626 --- munin-2.0.65.orig/plugins/node.d/slapd_.in 2020-10-28 22:36:02.000000000 +0100
627 +++ munin-2.0.65/plugins/node.d/slapd_.in 2021-01-04 17:53:09.696969144 +0100
630 # Change these to reflect your LDAP ACL. The given DN must have
631 # read access to the Monitor branch.
632 -my $basedn = "cn=Monitor";
633 +my $basedn = ($ENV{'basedn'} || "cn=Monitor");
634 my $server = ($ENV{'server'} || 'localhost');
635 my $userdn = ($ENV{'binddn'} || '');
636 my $userpw = ($ENV{'bindpw'} || '');
637 diff -ur munin-2.0.65.orig/plugins/node.d.linux/iostat.in munin-2.0.65/plugins/node.d.linux/iostat.in
638 --- munin-2.0.65.orig/plugins/node.d.linux/iostat.in 2020-10-28 22:36:02.000000000 +0100
639 +++ munin-2.0.65/plugins/node.d.linux/iostat.in 2021-01-04 17:53:09.715969144 +0100
641 if ($tmpnam =~ /\d+$/ and !$include_numbered) {
642 # Special case for devices like cXdXpX,
643 # like the cciss driver
644 - next unless $tmpnam =~ /\/c\d+d\d+$/
645 + next unless $tmpnam =~ /\/.*d\d+$/
647 next unless grep { $_ } @fields;
649 diff -ur munin-2.0.65.orig/plugins/node.d.linux/ip_.in munin-2.0.65/plugins/node.d.linux/ip_.in
650 --- munin-2.0.65.orig/plugins/node.d.linux/ip_.in 2020-10-28 22:36:02.000000000 +0100
651 +++ munin-2.0.65/plugins/node.d.linux/ip_.in 2021-01-04 17:53:09.715969144 +0100
652 @@ -128,14 +128,14 @@
653 # This is a fun hack to make the plugin ip6 compatible.
654 # Suggested in ticket #439 by "jodal".
657 + /usr/sbin/ip6tables "$@"
662 if [[ "$1" == "autoconf" ]]; then
663 if [[ -r /proc/net/dev ]]; then
664 - if ! iptables -L "$INPUT" -v -n -w -x >/dev/null 2>/dev/null; then
665 + if ! /usr/sbin/iptables -L "$INPUT" -v -n -w -x >/dev/null 2>/dev/null; then
666 echo "no (could not run iptables as user $(whoami))"
669 @@ -148,10 +148,10 @@
673 -if [[ "$1" == "suggest" ]]; then
674 - iptables -L "$INPUT" -v -n -x -w 2>/dev/null | awk --posix '$8 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}$/ { if (done[$8]!=1) {print $8; done[$8]=1;}}'
675 - if [[ -x /sbin/ip6tables ]]; then
676 - ip6tables -L "$INPUT" -v -n -x -w 2>/dev/null | awk --posix '$7 ~ /\/128$/ { if (done[$7]!=1) {a=$7;gsub(/\/128$/, "", a); print a; done[$7]=1;}}'
677 +if [ "$1" == "suggest" ]; then
678 + /usr/sbin/iptables -L "$INPUT" -v -n -x -w 2>/dev/null | awk --posix '$8 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}$/ { if (done[$8]!=1) {print $8; done[$8]=1;}}'
679 + if [[ -x /usr/sbin/ip6tables ]]; then
680 + /usr/sbin/ip6tables -L "$INPUT" -v -n -x -w 2>/dev/null | awk --posix '$7 ~ /\/128$/ { if (done[$7]!=1) {a=$7;gsub(/\/128$/, "", a); print a; done[$7]=1;}}'
686 # Escape .'s so they don't match _everything_?
687 escaped_ip=${IP//./\\.}
688 -iptables -L "$INPUT" -v -n -x -w | awk "/$escaped_ip"'[ /]/ { print "in.value " $2; exit 0; }'
689 -iptables -L "$OUTPUT" -v -n -x -w | awk "/$escaped_ip"'[ /]/ { print "out.value " $2; exit 0; }'
690 +/usr/sbin/iptables -L "$INPUT" -v -n -x -w | awk "/$escaped_ip"'[ /]/ { print "in.value " $2; exit 0; }'
691 +/usr/sbin/iptables -L "$OUTPUT" -v -n -x -w | awk "/$escaped_ip"'[ /]/ { print "out.value " $2; exit 0; }'
692 diff -ur munin-2.0.65.orig/plugins/node.d.linux/load.in munin-2.0.65/plugins/node.d.linux/load.in
693 --- munin-2.0.65.orig/plugins/node.d.linux/load.in 2020-10-28 22:36:02.000000000 +0100
694 +++ munin-2.0.65/plugins/node.d.linux/load.in 2021-01-04 17:53:09.715969144 +0100
696 # one machine answer for several)
698 # The title of the graph
699 - echo 'graph_title Load average'
700 + echo "graph_title Load average"
701 # Arguments to "rrdtool graph". In this case, tell it that the
702 # lower limit of the graph is '0', and that 1k=1000 (not 1024)
703 - echo 'graph_args --base 1000 -l 0'
704 + echo "graph_args --base 1000 -l 0"
706 - echo 'graph_vlabel load'
707 + echo "graph_vlabel load"
708 # We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of
710 - echo 'graph_scale no'
711 + echo "graph_scale no"
712 # Graph category. Defaults to 'other'
713 - echo 'graph_category system'
714 + echo "graph_category system"
715 # The fields. "label" is used in the legend. "label" is the only
717 - echo 'load.label load'
718 + echo "load.label load"
719 # These two read the environment for warning values for the field
720 # "load". If "load_warning" or "warning" aren't set in the
721 # environment, no warning levels are set. Likewise for "load_critical"
723 # This one is purely to add an explanation to the web page. The first
724 # one is for the graph itself, while the second one is for the field
726 - echo 'graph_info The load average of the machine describes how many processes are in the run-queue (scheduled to run "immediately").'
727 - echo 'load.info 5 minute load average'
728 + echo "graph_info The load average of the machine describes how many processes are in the run-queue (scheduled to run \"immediately\")."
729 + echo "load.info 5 minute load average"
731 # Last, if run with the "config"-parameter, quit here (don't
733 diff -ur munin-2.0.65.orig/plugins/node.d.linux/nfs_client.in munin-2.0.65/plugins/node.d.linux/nfs_client.in
734 --- munin-2.0.65.orig/plugins/node.d.linux/nfs_client.in 2020-10-28 22:36:02.000000000 +0100
735 +++ munin-2.0.65/plugins/node.d.linux/nfs_client.in 2021-01-04 17:53:09.715969144 +0100
737 proc="getattr setattr lookup access readlink read write create mkdir symlink mknod remove rmdir rename link readdir readdirplus fsstat fsinfo pathconf commit"
739 if [ "$1" = "autoconf" ]; then
740 - if [ -f "$NFS" ]; then
741 + if [ -r "$NFS" ]; then
742 if grep -q proc3 "$NFS"; then
750 - split("'"$proc"'", names)
753 - printf("%s.value %d\n", names[++i], values[i+3]);
789 + nfs_readdirplus+=$20
796 + print "getattr.value " nfs_getattr
797 + print "setattr.value " nfs_setattr
798 + print "lookup.value " nfs_lookup
799 + print "access.value " nfs_access
800 + print "readlink.value " nfs_readlink
801 + print "read.value " nfs_read
802 + print "write.value " nfs_write
803 + print "create.value " nfs_create
804 + print "mkdir.value " nfs_mkdir
805 + print "symlink.value " nfs_symlink
806 + print "mknod.value " nfs_mknod
807 + print "remove.value " nfs_remove
808 + print "rmdir.value " nfs_rmdir
809 + print "rename.value " nfs_rename
810 + print "link.value " nfs_link
811 + print "readdir.value " nfs_readdir
812 + print "readdirplus.value " nfs_readdirplus
813 + print "fsstat.value " nfs_fsstat
814 + print "fsinfo.value " nfs_fsinfo
815 + print "pathconf.value " nfs_pathconf
816 + print "commit.value " nfs_commit
819 diff -ur munin-2.0.65.orig/plugins/node.d.linux/nfsd.in munin-2.0.65/plugins/node.d.linux/nfsd.in
820 --- munin-2.0.65.orig/plugins/node.d.linux/nfsd.in 2020-10-28 22:36:02.000000000 +0100
821 +++ munin-2.0.65/plugins/node.d.linux/nfsd.in 2021-01-04 17:53:09.716969144 +0100
823 proc="getattr setattr lookup access readlink read write create mkdir symlink mknod remove rmdir rename link readdir readdirplus fsstat fsinfo pathconf commit"
825 if [ "$1" = "autoconf" ]; then
826 - if [ -f "$NFSD" ]; then
827 + if [ -r "$NFSD" ]; then
828 grep -q proc3 "$NFSD"
829 if grep -q proc3 "$NFSD"; then
836 - split("'"$proc"'", names)
839 - printf("%s.value %d\n", names[++i], values[i+3]);
875 + nfs_readdirplus+=$20
882 + print "getattr.value " nfs_getattr
883 + print "setattr.value " nfs_setattr
884 + print "lookup.value " nfs_lookup
885 + print "access.value " nfs_access
886 + print "readlink.value " nfs_readlink
887 + print "read.value " nfs_read
888 + print "write.value " nfs_write
889 + print "create.value " nfs_create
890 + print "mkdir.value " nfs_mkdir
891 + print "symlink.value " nfs_symlink
892 + print "mknod.value " nfs_mknod
893 + print "remove.value " nfs_remove
894 + print "rmdir.value " nfs_rmdir
895 + print "rename.value " nfs_rename
896 + print "link.value " nfs_link
897 + print "readdir.value " nfs_readdir
898 + print "readdirplus.value " nfs_readdirplus
899 + print "fsstat.value " nfs_fsstat
900 + print "fsinfo.value " nfs_fsinfo
901 + print "pathconf.value " nfs_pathconf
902 + print "commit.value " nfs_commit
904 diff -ur munin-2.0.65.orig/plugins/node.d.linux/vlan_inetuse_.in munin-2.0.65/plugins/node.d.linux/vlan_inetuse_.in
905 --- munin-2.0.65.orig/plugins/node.d.linux/vlan_inetuse_.in 2020-10-28 22:36:02.000000000 +0100
906 +++ munin-2.0.65/plugins/node.d.linux/vlan_inetuse_.in 2021-01-04 17:53:09.716969144 +0100
911 -open (IN, "/sbin/iptables -v -x -w -L $INTERFACE-in |") or
912 +open (IN, "/usr/sbin/iptables -v -x -w -L $INTERFACE-in |") or
913 die "Could not run iptables: $!\n";
918 die "Error running iptables. Dying\n" if $?;
920 -open (IN, "/sbin/iptables -v -x -w -L $INTERFACE-out |") or
921 +open (IN, "/usr/sbin/iptables -v -x -w -L $INTERFACE-out |") or
922 die "Could not run iptables: $!\n";
929 -die "Error running iptables. Dying\n" if $?;
930 +die "Error running /usr/sbin/iptables. Dying\n" if $?;
932 if ($ARGV[0] and $ARGV[0] eq "config")
934 diff -ur munin-2.0.65.orig/plugins/node.d.linux/vlan_linkuse_.in munin-2.0.65/plugins/node.d.linux/vlan_linkuse_.in
935 --- munin-2.0.65.orig/plugins/node.d.linux/vlan_linkuse_.in 2020-10-28 22:36:02.000000000 +0100
936 +++ munin-2.0.65/plugins/node.d.linux/vlan_linkuse_.in 2021-01-04 17:53:09.716969144 +0100
941 -open (IN, "/sbin/iptables -v -x -w -L $INTERFACE-in |") or
942 +open (IN, "/usr/sbin/iptables -v -x -w -L $INTERFACE-in |") or
943 die "Could not run iptables: $!\n";
948 die "Error running iptables. Dying\n" if $?;
950 -open (IN, "/sbin/iptables -v -x -w -L $INTERFACE-out |") or
951 +open (IN, "/usr/sbin/iptables -v -x -w -L $INTERFACE-out |") or
952 die "Could not run iptables: $!\n";
959 -die "Error running iptables. Dying\n" if $?;
960 +die "Error running /usr/sbin/iptables. Dying\n" if $?;
962 diff -ur munin-2.0.65.orig/plugins/node.d.linux/vserver_resources.in munin-2.0.65/plugins/node.d.linux/vserver_resources.in
963 --- munin-2.0.65.orig/plugins/node.d.linux/vserver_resources.in 2020-10-28 22:36:02.000000000 +0100
964 +++ munin-2.0.65/plugins/node.d.linux/vserver_resources.in 2021-01-04 17:53:09.716969144 +0100
966 echo 'graph_vlabel ANON pages'
967 echo 'graph_info Shows anonymous memory (human readable) used by each vserver.'
970 + echo 'graph_title Mapped memory used by vserver'
971 + echo 'graph_args --base 1024k -l 0'
972 + echo 'graph_vlabel RMAP pages'
973 + echo 'graph_info Shows mapped memory (human readable) used by each vserver.'
976 echo 'graph_title Files used by vserver'
977 echo 'graph_args --base 1024k -l 0'
979 echo 'graph_vlabel SHM pages'
980 echo 'graph_info Shows shared memory (human readable) used by each vserver.'
983 + echo 'graph_title Semaphore arrays used by vserver'
984 + echo 'graph_args --base 1024k -l 0'
985 + echo 'graph_vlabel Semaphore arrays'
986 + echo 'graph_info Shows semaphore arrays used by each vserver.'
989 + echo 'graph_title Semaphores used by vserver'
990 + echo 'graph_args --base 1024k -l 0'
991 + echo 'graph_vlabel Semaphores'
992 + echo 'graph_info Shows semaphores used by each vserver.'
995 + echo 'graph_title dentry structs used by vserver'
996 + echo 'graph_args --base 1024k -l 0'
997 + echo 'graph_vlabel dentry structs'
998 + echo 'graph_info Shows dentry structs used by each vserver.'
1001 + echo 'graph_title Resources used by vserver'
1002 + echo 'graph_args --base 1024k -l 0'
1003 + echo 'graph_vlabel Resources'
1004 + echo 'graph_info Shows rsources used by each vserver.'
1007 echo "$RESOURCE not defined."
1009 @@ -301,53 +331,108 @@
1013 - echo "$NAME.label $LABEL: processes"
1014 - echo "$NAME.info Number of processes used by $LABEL."
1015 + echo "${NAME}_PROC.label $LABEL: processes"
1016 + echo "${NAME}_PROC.info Number of processes used by $LABEL."
1019 - echo "$NAME.label $LABEL: Virtual memory"
1020 - echo "$NAME.info Size of virtual memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1021 - echo "$NAME.cdef $NAME,$pagesize,*"
1022 + echo "${NAME}_VM.label $LABEL: Virtual memory"
1023 + echo "${NAME}_VM.info Size of virtual memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1024 + echo "${NAME}_VM.cdef ${NAME}_VM,$pagesize,*"
1027 - echo "$NAME.label $LABEL: Locked memory"
1028 - echo "$NAME.info Size of locked memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1029 - echo "$NAME.cdef $NAME,$pagesize,*"
1030 + echo "${NAME}_VML.label $LABEL: Locked memory"
1031 + echo "${NAME}_VML.info Size of locked memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1032 + echo "${NAME}_VML.cdef ${NAME}_VML,$pagesize,*"
1035 - echo "$NAME.label $LABEL: Resident set size"
1036 - echo "$NAME.info Size of resident set size used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1037 - echo "$NAME.cdef $NAME,$pagesize,*"
1038 + echo "${NAME}_RSS.label $LABEL: Resident set size"
1039 + echo "${NAME}_RSS.info Size of resident set size used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1040 + echo "${NAME}_RSS.cdef ${NAME}_RSS,$pagesize,*"
1043 - echo "$NAME.label $LABEL: Anonymous memory"
1044 - echo "$NAME.info Size of anonymous memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1045 - echo "$NAME.cdef $NAME,$pagesize,*"
1046 + echo "${NAME}_ANON.label $LABEL: Anonymous memory"
1047 + echo "${NAME}_ANON.info Size of anonymous memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1048 + echo "${NAME}_ANON.cdef ${NAME}_ANON,$pagesize,*"
1051 + echo "${NAME}_RMAP.label $LABEL: Mapped memory"
1052 + echo "${NAME}_RMAP.info Size of mapped memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1053 + echo "${NAME}_RMAP.cdef ${NAME}_RMAP,$pagesize,*"
1056 - echo "$NAME.label $LABEL: Files"
1057 - echo "$NAME.info Number of files used by $LABEL."
1058 + echo "${NAME}_FILES.label $LABEL: Files"
1059 + echo "${NAME}_FILES.info Number of files used by $LABEL."
1062 - echo "$NAME.label $LABEL: Open filedescriptors"
1063 - echo "$NAME.info Number of open filedescriptors used by $LABEL."
1064 + echo "${NAME}_OFD.label $LABEL: Open filedescriptors"
1065 + echo "${NAME}_OFD.info Number of open filedescriptors used by $LABEL."
1068 - echo "$NAME.label $LABEL: Locks"
1069 - echo "$NAME.info Number of locks used by $LABEL."
1070 + echo "${NAME}_LOCKS.label $LABEL: Locks"
1071 + echo "${NAME}_LOCKS.info Number of locks used by $LABEL."
1074 - echo "$NAME.label $LABEL: Sockets"
1075 - echo "$NAME.info Number of sockets used by $LABEL."
1076 + echo "${NAME}_SOCK.label $LABEL: Sockets"
1077 + echo "${NAME}_SOCK.info Number of sockets used by $LABEL."
1080 - echo "$NAME.label $LABEL: Message queues"
1081 - echo "$NAME.info Number of message queues used by $LABEL."
1082 + echo "${NAME}_MSGQ.label $LABEL: Message queues"
1083 + echo "${NAME}_MSGQ.info Number of message queues used by $LABEL."
1086 - echo "$NAME.label $LABEL: Shared memory"
1087 - echo "$NAME.info Size of shared memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1088 - echo "$NAME.cdef $1,$pagesize,*"
1089 + echo "${NAME}_SHM.label $LABEL: Shared memory"
1090 + echo "${NAME}_SHM.info Size of shared memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1091 + echo "${NAME}_SHM.cdef ${NAME}_SHM,$pagesize,*"
1094 + echo "${NAME}_SEMA.label $LABEL: Semaphore arrays"
1095 + echo "${NAME}_SEMA.info Number of semaphore arrays used by $LABEL."
1098 + echo "${NAME}_SEMS.label $LABEL: Semaphores"
1099 + echo "${NAME}_SEMS.info Number of semaphores used by $LABEL."
1102 + echo "${NAME}_DENT.label $LABEL: dentry structs"
1103 + echo "${NAME}_DENT.info Number of dentries used by $LABEL."
1106 + echo "${NAME}_PROC.label $LABEL: processes"
1107 + echo "${NAME}_PROC.info Number of processes used by $LABEL."
1108 + echo "${NAME}_VM.label $LABEL: Virtual memory"
1109 + echo "${NAME}_VM.info Size of virtual memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1110 + echo "${NAME}_VM.cdef ${NAME}_VM,$pagesize,*"
1111 + echo "${NAME}_VML.label $LABEL: Locked memory"
1112 + echo "${NAME}_VML.info Size of locked memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1113 + echo "${NAME}_VML.cdef ${NAME}_VML,$pagesize,*"
1114 + echo "${NAME}_RSS.label $LABEL: Resident set size"
1115 + echo "${NAME}_RSS.info Size of resident set size used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1116 + echo "${NAME}_RSS.cdef ${NAME}_RSS,$pagesize,*"
1117 + echo "${NAME}_ANON.label $LABEL: Anonymous memory"
1118 + echo "${NAME}_ANON.info Size of anonymous memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1119 + echo "${NAME}_ANON.cdef ${NAME}_ANON,$pagesize,*"
1120 + echo "${NAME}_RMAP.label $LABEL: Mapped memory"
1121 + echo "${NAME}_RMAP.info Size of mapped memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1122 + echo "${NAME}_RMAP.cdef ${NAME}_RMAP,$pagesize,*"
1123 + echo "${NAME}_FILES.label $LABEL: Files"
1124 + echo "${NAME}_FILES.info Number of files used by $LABEL."
1125 + echo "${NAME}_OFD.label $LABEL: Open filedescriptors"
1126 + echo "${NAME}_OFD.info Number of open filedescriptors used by $LABEL."
1127 + echo "${NAME}_LOCKS.label $LABEL: Locks"
1128 + echo "${NAME}_LOCKS.info Number of locks used by $LABEL."
1129 + echo "${NAME}_SOCK.label $LABEL: Sockets"
1130 + echo "${NAME}_SOCK.info Number of sockets used by $LABEL."
1131 + echo "${NAME}_MSGQ.label $LABEL: Message queues"
1132 + echo "${NAME}_MSGQ.info Number of message queues used by $LABEL."
1133 + echo "${NAME}_SHM.label $LABEL: Shared memory"
1134 + echo "${NAME}_SHM.info Size of shared memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1135 + echo "${NAME}_SHM.cdef ${NAME}_SHM,$pagesize,*"
1136 + echo "${NAME}_SEMA.label $LABEL: Semaphore arrays"
1137 + echo "${NAME}_SEMA.info Number of semaphore arrays used by $LABEL."
1138 + echo "${NAME}_SEMS.label $LABEL: Semaphores"
1139 + echo "${NAME}_SEMS.info Number of semaphores used by $LABEL."
1140 + echo "${NAME}_DENT.label $LABEL: dentry structs"
1141 + echo "${NAME}_DENT.info Number of dentries used by $LABEL."
1144 echo "$RESOURCE not defined."
1146 if [ -n "$LIMITS" ] && [ "$LIMITS" = 1 ]; then
1147 LIMIT=$(grep "$RESOURCE" "/proc/virtual/$xid/limit" | cut -f 4)
1148 if [ "${LIMIT:-0}" -gt 0 ]; then
1149 - echo "$NAME.critical $LIMIT"
1150 + echo "${NAME}_${RESOURCE}.critical $LIMIT"
1154 @@ -369,8 +454,18 @@
1155 for xid in $XIDS ; do
1156 LABEL=$(grep "NodeName" "/proc/virtual/$xid/$NAMELOC" | cut -f 2)
1157 NAME=$(echo "$LABEL" | cut -d. -f1 | tr '-' '_')
1158 - awk -v name="${NAME}" -v resource="${RESOURCE}:" \
1159 - '{ if ( $1 == resource ) printf "%s.value %d\n", name, $2 }' \
1160 + if [ $RESOURCE = "ALL" ]; then
1161 + awk -v name="${NAME}" \
1162 + '{ if ( $1 ~ /[A-Z]*:/ ) {
1163 + resource = $1 ; gsub(/:/, "", resource);
1164 + printf "%s_%s.value %d\n", name, resource, $2
1166 + "/proc/virtual/$xid/limit"
1168 + awk -v name="${NAME}" -v resource="${RESOURCE}" \
1169 + '{ if ( $1 ~ resource )
1170 + printf "%s_%s.value %d\n", name, resource, $2 }' \
1171 "/proc/virtual/$xid/limit"