1 diff -urN munin-2.0.17/dists/tarball/plugins.conf munin-2.0.17-plugins/dists/tarball/plugins.conf
2 --- munin-2.0.17/dists/tarball/plugins.conf 2013-07-19 18:30:03.000000000 +0200
3 +++ munin-2.0.17-plugins/dists/tarball/plugins.conf 2013-08-17 13:18:51.817585940 +0200
9 +env.logtail /usr/bin/logtail
12 #env.mysqlopts -u someuser
26 +env.amavislog /var/log/maillog
27 +env.logfile /var/log/maillog
31 +env.logfile /var/log/maillog
39 +env.querystats /var/lib/named/named.stats
44 +#env.squiduser manager
45 +#env.squidpasswd <SECRET>
55 +env.leasefile /var/lib/dhcpd/dhcpd.leases
56 +env.configfile /etc/dhcpd.conf
90 +env.upshost 127.0.0.1
93 +#user root # if you have mode 0000 /vservers dir
96 +# Sane defaults for plugins from MuninExchange
99 +#user root # if you have kernel with grsecurity
101 +env.pname httpd.prefork
106 +env.logfile /var/log/maillog
110 +env.password eAccelerator
111 +env.url http://127.0.0.1/eaccelerator/control.php
115 +env.logfile /var/log/xferlog
119 +env.logfile /var/log/vsftpd.log
123 +env.logfile /var/log/maillog
127 +env.statuslog /var/lib/nagios/status.dat
131 +env.radius_log /var/log/freeradius/radius.log
139 +env.logfile /var/log/openvpn/status.log
143 diff -urN munin-2.0.17/plugins/node.d/amavis.in munin-2.0.17-plugins/plugins/node.d/amavis.in
144 --- munin-2.0.17/plugins/node.d/amavis.in 2013-07-19 18:30:03.000000000 +0200
145 +++ munin-2.0.17-plugins/plugins/node.d/amavis.in 2013-08-17 13:18:51.820919315 +0200
150 - cmd=`echo $MUNIN_MKTEMP | sed s/\\$1/$1/`
155 AMAVIS_LOG=${amavislog:-/var/log/mail/mail.info}
156 LOGTAIL=${logtail:-logtail}
157 -STATEFILE=$MUNIN_PLUGSTATE/amavis.offset
158 +STATEFILE=@@PLUGSTATE@@/amavis.offset
160 if [ "$1" = "autoconf" ]; then
161 if [ -f "${AMAVIS_LOG}" -a -n "${LOGTAIL}" -a -x "${LOGTAIL}" ] ; then
164 if [ "$1" = "config" ]; then
165 echo 'graph_title Amavis filter statistics'
166 - echo 'graph_vlabel \#'
167 + echo 'graph_vlabel mails'
168 echo 'graph_category antivirus'
169 echo 'virus.label virus'
170 echo 'virus.info Number of viruses caught in email'
175 -TEMP_FILE=$(mktempfile munin-amavis.XXXXXX)
176 +TEMP_FILE=$(mktempfile munin-amavis.XXXXXXXXXX)
178 if [ -n "$TEMP_FILE" -a -f "$TEMP_FILE" ]
180 diff -urN munin-2.0.17/plugins/node.d/apache_accesses.in munin-2.0.17-plugins/plugins/node.d/apache_accesses.in
181 --- munin-2.0.17/plugins/node.d/apache_accesses.in 2013-07-19 18:30:03.000000000 +0200
182 +++ munin-2.0.17-plugins/plugins/node.d/apache_accesses.in 2013-08-17 13:18:51.817585940 +0200
185 my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://127.0.0.1:%d/server-status?auto";
186 my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80);
187 +my $HOST = exists $ENV{'host'} ? $ENV{'host'} : undef;
189 if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" )
193 if ( defined $ARGV[0] and $ARGV[0] eq "config" )
195 - print "graph_title Apache accesses\n";
196 + print "graph_title Apache accesses";
198 + print " for $HOST";
201 print "graph_args --base 1000\n";
202 print "graph_vlabel accesses / \${graph_period}\n";
203 print "graph_category apache\n";
204 diff -urN munin-2.0.17/plugins/node.d/apache_processes.in munin-2.0.17-plugins/plugins/node.d/apache_processes.in
205 --- munin-2.0.17/plugins/node.d/apache_processes.in 2013-07-19 18:30:03.000000000 +0200
206 +++ munin-2.0.17-plugins/plugins/node.d/apache_processes.in 2013-08-17 13:18:51.817585940 +0200
209 my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://127.0.0.1:%d/server-status?auto";
210 my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80);
211 +my $HOST = exists $ENV{'host'} ? $ENV{'host'} : undef;
212 my $SHOWFREE = !exists $ENV{'showfree'} || $ENV{'showfree'};
214 if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" )
217 if ( defined $ARGV[0] and $ARGV[0] eq "config" )
219 - print "graph_title Apache processes\n";
220 + print "graph_title Apache processes";
222 + print " for $HOST";
225 print "graph_args --base 1000 -l 0\n";
226 print "graph_category apache\n";
227 print "graph_order ";
228 diff -urN munin-2.0.17/plugins/node.d/apache_volume.in munin-2.0.17-plugins/plugins/node.d/apache_volume.in
229 --- munin-2.0.17/plugins/node.d/apache_volume.in 2013-07-19 18:30:03.000000000 +0200
230 +++ munin-2.0.17-plugins/plugins/node.d/apache_volume.in 2013-08-17 13:18:51.817585940 +0200
233 my $URL = exists $ENV{'url'} ? $ENV{'url'} : "http://127.0.0.1:%d/server-status?auto";
234 my @PORTS = exists $ENV{'ports'} ? split(' ', $ENV{'ports'}) : (80);
235 +my $HOST = exists $ENV{'host'} ? $ENV{'host'} : undef;
237 if ( defined $ARGV[0] and $ARGV[0] eq "autoconf" )
241 if ( defined $ARGV[0] and $ARGV[0] eq "config" )
243 - print "graph_title Apache volume\n";
244 + print "graph_title Apache volume";
246 + print " for $HOST";
249 print "graph_args --base 1000\n";
250 print "graph_vlabel bytes per \${graph_period}\n";
251 print "graph_category apache\n";
252 diff -urN munin-2.0.17/plugins/node.d/bind9.in munin-2.0.17-plugins/plugins/node.d/bind9.in
253 --- munin-2.0.17/plugins/node.d/bind9.in 2013-07-19 18:30:03.000000000 +0200
254 +++ munin-2.0.17-plugins/plugins/node.d/bind9.in 2013-08-17 13:18:51.820919315 +0200
258 my $QUERYLOG = $ENV{logfile} || '/var/log/bind9/query.log';
259 -my $STATEFILE= "$ENV{MUNIN_PLUGSTATE}/bind9.state";
260 +my $STATEFILE= "@@PLUGSTATE@@/bind9.state";
265 open(Q, ">", $STATEFILE);
268 - open(Q,"< $STATEFILE") or die ("Cannot open state file");
269 + open(Q,"< $STATEFILE") or return ("Cannot open state file");
272 my ($q,$n) = split(/\s+/,$_,2);
273 diff -urN munin-2.0.17/plugins/node.d/courier_.in munin-2.0.17-plugins/plugins/node.d/courier_.in
274 --- munin-2.0.17/plugins/node.d/courier_.in 2013-07-19 18:30:03.000000000 +0200
275 +++ munin-2.0.17-plugins/plugins/node.d/courier_.in 2013-08-17 13:18:51.817585940 +0200
277 COURIER_LOG=${logfile:-/var/log/mail.log}
278 SERVICE=${service:-`basename $0 | sed 's/^courier_//g'`}
279 OFFSET_FILE=${MUNIN_PLUGSTATE}/courier_${SERVICE}.offset
280 -LOGTAIL=${logtail:-/usr/sbin/logtail}
281 +LOGTAIL=${logtail:-`which logtail`}
285 diff -urN munin-2.0.17/plugins/node.d/courier_mta_mailstats.in munin-2.0.17-plugins/plugins/node.d/courier_mta_mailstats.in
286 --- munin-2.0.17/plugins/node.d/courier_mta_mailstats.in 2013-07-19 18:30:03.000000000 +0200
287 +++ munin-2.0.17-plugins/plugins/node.d/courier_mta_mailstats.in 2013-08-17 13:18:51.817585940 +0200
290 if($startsize < $pos) {
292 - parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
293 + if (-f $rotlogfile) {
294 + parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
299 diff -urN munin-2.0.17/plugins/node.d/courier_mta_mailvolume.in munin-2.0.17-plugins/plugins/node.d/courier_mta_mailvolume.in
300 --- munin-2.0.17/plugins/node.d/courier_mta_mailvolume.in 2013-07-19 18:30:03.000000000 +0200
301 +++ munin-2.0.17-plugins/plugins/node.d/courier_mta_mailvolume.in 2013-08-17 13:18:51.817585940 +0200
304 if($startsize < $pos) {
306 - parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
307 + if (-f $rotlogfile) {
308 + parseLogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
313 diff -urN munin-2.0.17/plugins/node.d/cupsys_pages.in munin-2.0.17-plugins/plugins/node.d/cupsys_pages.in
314 --- munin-2.0.17/plugins/node.d/cupsys_pages.in 2013-07-19 18:30:03.000000000 +0200
315 +++ munin-2.0.17-plugins/plugins/node.d/cupsys_pages.in 2013-08-17 13:18:51.817585940 +0200
318 if ($startsize < $pos) {
320 - parselogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
321 + if (-f $rotlogfile) {
322 + parselogfile ($rotlogfile, $pos, (stat $rotlogfile)[7]);
328 while (tell(LOGFILE) < $stop) {
329 my $line = <LOGFILE>;
331 - if ($line =~ /^(\S+)\s+\S+\s+\d+\s+\[[^\]]+\]\s+(\d+)\s+(\d+)\s+(\S+)\s+(\S+)/) {
332 + if ($line =~ /^(\S+)\s+\S+\s+\S+\s+\[[^\]]+\]\s+(\d+)\s+(\d+)\s+(.+)$/) {
333 if(!defined($printers{$1}) && keys(%printers) < $MAXLABEL) {
334 $printers{$1} += int($2)*int($3);
335 } elsif(defined($printers{$1})) {
336 diff -urN munin-2.0.17/plugins/node.d/foldingathome_rank.in munin-2.0.17-plugins/plugins/node.d/foldingathome_rank.in
337 --- munin-2.0.17/plugins/node.d/foldingathome_rank.in 2013-07-19 18:30:03.000000000 +0200
338 +++ munin-2.0.17-plugins/plugins/node.d/foldingathome_rank.in 2013-08-17 13:18:51.820919315 +0200
341 #%# capabilities=autoconf
343 -statefile=$MUNIN_PLUGSTATE/plugin-fah_rank.state
344 +statefile=@@PLUGSTATE@@/plugin-fah_rank.state
346 if [ "$1" = "autoconf" ]; then
347 # No real check of anything
348 diff -urN munin-2.0.17/plugins/node.d/mailman.in munin-2.0.17-plugins/plugins/node.d/mailman.in
349 --- munin-2.0.17/plugins/node.d/mailman.in 2013-07-19 18:30:03.000000000 +0200
350 +++ munin-2.0.17-plugins/plugins/node.d/mailman.in 2013-08-17 13:18:51.817585940 +0200
353 $logfile = $ENV{'logfile'} || "/var/log/mailman/post";
354 $libdir = $ENV{'libdir'} || "/var/lib/mailman";
355 -$lister = $ENV{'lister'} || "/usr/lib/mailman/bin/list_members";
356 +$lister = $ENV{'lister'} || {
357 + if (-f "/usr/lib64/mailman/bin/list_members") {
358 + $lister = "/usr/lib64/mailman/bin/list_members";
360 + $lister = "/usr/lib/mailman/bin/list_members";
368 } elsif($startsize < $pos) {
370 - parseMailmanLog($rotlogfile, $pos, (stat $rotlogfile)[7]);
371 + if (-f $rotlogfile) {
372 + parseMailmanLog($rotlogfile, $pos, (stat $rotlogfile)[7]);
377 diff -urN munin-2.0.17/plugins/node.d/mysql_.in munin-2.0.17-plugins/plugins/node.d/mysql_.in
378 --- munin-2.0.17/plugins/node.d/mysql_.in 2013-07-19 18:30:03.000000000 +0200
379 +++ munin-2.0.17-plugins/plugins/node.d/mysql_.in 2013-08-17 13:18:51.820919315 +0200
381 env.mysqlconnection DBI:mysql:mysql;host=127.0.0.1;port=3306
383 env.mysqlpassword geheim
384 + env.mysqlnosuperpriv 1
385 env.cachenamespace munin_mysql_pri
387 env.mysqlconnection DBI:mysql:mysql;host=127.0.0.1;port=13306
389 'user' => $ENV{'mysqluser'} || 'root',
390 'password' => $ENV{'mysqlpassword'} || '',
391 'cache_namespace' => $ENV{'cachenamespace'} || 'munin_mysql',
392 + 'nosuper' => $ENV{'mysqlnosuperpriv'} || 0,
398 update_variables($dbh);
400 - update_master($dbh);
401 - update_slave($dbh);
402 + if (!$config{nosuper}) {
403 + update_master($dbh);
404 + update_slave($dbh);
407 $shared_memory_cache->set('data', $data);
409 diff -urN munin-2.0.17/plugins/node.d/mysql_innodb.in munin-2.0.17-plugins/plugins/node.d/mysql_innodb.in
410 --- munin-2.0.17/plugins/node.d/mysql_innodb.in 2013-08-17 13:19:03.501062149 +0200
411 +++ munin-2.0.17-plugins/plugins/node.d/mysql_innodb.in 2013-08-17 13:18:51.994254767 +0200
418 diff -urN munin-2.0.17/plugins/node.d/mysql_slowqueries.in munin-2.0.17-plugins/plugins/node.d/mysql_slowqueries.in
419 --- munin-2.0.17/plugins/node.d/mysql_slowqueries.in 2013-07-19 18:30:03.000000000 +0200
420 +++ munin-2.0.17-plugins/plugins/node.d/mysql_slowqueries.in 2013-08-17 13:18:51.817585940 +0200
425 -/usr/bin/printf "queries.value "
426 +/bin/printf "queries.value "
427 ($MYSQLADMIN $MYSQLOPTS status 2>/dev/null || echo a a a a a a a a U) | awk '{print $9}'
428 diff -urN munin-2.0.17/plugins/node.d/mysql_threads.in munin-2.0.17-plugins/plugins/node.d/mysql_threads.in
429 --- munin-2.0.17/plugins/node.d/mysql_threads.in 2013-08-17 13:19:03.501062149 +0200
430 +++ munin-2.0.17-plugins/plugins/node.d/mysql_threads.in 2013-08-17 13:18:51.994254767 +0200
435 -/usr/bin/printf "threads.value "
436 +/bin/printf "threads.value "
437 ($MYSQLADMIN $MYSQLOPTS status 2>/dev/null || echo 'a a a U') | awk '{print $4}'
438 diff -urN munin-2.0.17/plugins/node.d/ntp_.in munin-2.0.17-plugins/plugins/node.d/ntp_.in
439 --- munin-2.0.17/plugins/node.d/ntp_.in 2013-07-19 18:30:03.000000000 +0200
440 +++ munin-2.0.17-plugins/plugins/node.d/ntp_.in 2013-08-17 13:18:51.817585940 +0200
444 if ($ARGV[0] and $ARGV[0] eq "autoconf") {
445 - `ntpq -c help >/dev/null 2>/dev/null`;
446 + `/usr/sbin/ntpq -c help >/dev/null 2>/dev/null`;
447 if ($CHILD_ERROR eq "0") {
448 - if (`ntpq -n -c peers | wc -l` > 0) {
449 + if (`/usr/sbin/ntpq -n -c peers | wc -l` > 0) {
453 - print "no (ntpq -p returned no peers)\n";
454 + print "no (/usr/sbin/ntpq -p returned no peers)\n";
458 - print "no (ntpq not found)\n";
459 + print "no (/usr/sbin/ntpq not found)\n";
464 if ($ARGV[0] and $ARGV[0] eq "suggest") {
465 - foreach my $line (`ntpq -c associations`) {
466 + foreach my $line (`/usr/sbin/ntpq -c associations`) {
467 if ($line =~ m/^\s*\d+/) {
468 my (undef, undef, $assid, undef, undef, undef, undef, undef, undef, undef) = split(/\s+/, $line);
469 - chomp(my $peerinfo = `ntpq -n -c "readvar $assid srcadr"`);
470 + chomp(my $peerinfo = `/usr/sbin/ntpq -n -c "readvar $assid srcadr"`);
471 $peerinfo =~ s/\R/ /g;
472 my ($peer_addr) = ($peerinfo =~ m/srcadr=(.*)/);
473 print $peer_addr, "\n" unless $peer_addr eq "0.0.0.0";
478 -my @associations = `ntpq -c associations`;
479 +my @associations = `/usr/sbin/ntpq -c associations`;
481 foreach my $line (@associations) {
482 if ($line =~ m/^\s*\d+/) {
483 diff -urN munin-2.0.17/plugins/node.d/ntp_kernel_err.in munin-2.0.17-plugins/plugins/node.d/ntp_kernel_err.in
484 --- munin-2.0.17/plugins/node.d/ntp_kernel_err.in 2013-07-19 18:30:03.000000000 +0200
485 +++ munin-2.0.17-plugins/plugins/node.d/ntp_kernel_err.in 2013-08-17 13:18:51.820919315 +0200
487 export PATH=/usr/local/sbin:$PATH
489 if [ "$1" = "autoconf" ]; then
490 - { ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
491 + { /usr/sbin/ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
493 /^estimated error:/ { ev=0; }
494 END { if (ev == 0) { print "yes";} else { print "no"; } exit ev; }'
497 printf 'ntp_err.value '
499 -if [ $(ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]' | tr -d '.') -ge 427 ]
500 +if [ $(/usr/sbin/ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]' | tr -d '.') -ge 427 ]
506 + cmd=/usr/sbin/ntpdc
509 $cmd -c kerninfo | awk '/^estimated error:/ { print $3 }'
510 diff -urN munin-2.0.17/plugins/node.d/ntp_kernel_pll_freq.in munin-2.0.17-plugins/plugins/node.d/ntp_kernel_pll_freq.in
511 --- munin-2.0.17/plugins/node.d/ntp_kernel_pll_freq.in 2013-08-17 13:19:03.501062149 +0200
512 +++ munin-2.0.17-plugins/plugins/node.d/ntp_kernel_pll_freq.in 2013-08-17 13:18:51.994254767 +0200
514 export PATH=/usr/local/sbin:$PATH
516 if [ "$1" = "autoconf" ]; then
517 - { ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
518 + { /usr/sbin/ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
520 /^pll frequency:/ { ev=0; }
521 END { if (ev == 0) { print "yes";} else { print "no"; } exit ev; }'
524 printf 'ntp_pll_freq.value '
526 -if [ $(ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]' | tr -d '.') -ge 427 ]
527 +if [ $(/usr/sbin/ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]' | tr -d '.') -ge 427 ]
533 + cmd=/usr/sbin/ntpdc
536 $cmd -c kerninfo | awk -v fcomp=$fcomp '/^pll frequency:/ { print $3 + fcomp }'
537 diff -urN munin-2.0.17/plugins/node.d/ntp_kernel_pll_off.in munin-2.0.17-plugins/plugins/node.d/ntp_kernel_pll_off.in
538 --- munin-2.0.17/plugins/node.d/ntp_kernel_pll_off.in 2013-07-19 18:30:03.000000000 +0200
539 +++ munin-2.0.17-plugins/plugins/node.d/ntp_kernel_pll_off.in 2013-08-17 13:18:51.820919315 +0200
541 export PATH=/usr/local/sbin:$PATH
543 if [ "$1" = "autoconf" ]; then
544 - { ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
545 + { /usr/sbin/ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
547 /^pll offset:/ { ev=0; }
548 END { if (ev == 0) { print "yes";} else { print "no"; } exit ev; }'
551 printf 'ntp_pll_off.value '
553 -if [ $(ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]' | tr -d '.') -ge 427 ]
554 +if [ $(/usr/sbin/ntpq -c version | grep --extended-regexp --only-matching '[[:digit:]]\.[[:digit:]]\.[[:digit:]]' | tr -d '.') -ge 427 ]
560 + cmd=/usr/sbin/ntpdc
563 $cmd -c kerninfo | awk '/^pll offset:/ { print $3 }'
564 diff -urN munin-2.0.17/plugins/node.d/ntp_offset.in munin-2.0.17-plugins/plugins/node.d/ntp_offset.in
565 --- munin-2.0.17/plugins/node.d/ntp_offset.in 2013-07-19 18:30:03.000000000 +0200
566 +++ munin-2.0.17-plugins/plugins/node.d/ntp_offset.in 2013-08-17 13:18:51.820919315 +0200
571 - ntpq -c help >/dev/null 2>&1 || { echo 'no (no ntpq program)'; exit 0; }
572 + /usr/sbin/ntpq -c help >/dev/null 2>&1 || { echo 'no (no ntpq program)'; exit 0; }
574 - case "$(ntpq -n -p 2>/dev/null | wc -l)" in
575 + case "$(/usr/sbin/ntpq -n -p 2>/dev/null | wc -l)" in
577 echo 'no (unable to list peers)'
583 - syspeer="$(ntpq -n -p | grep '^[*o]')"
584 + syspeer="$(/usr/sbin/ntpq -n -p | grep '^[*o]')"
592 - syspeer="$(ntpq -n -p | grep '^[*o]')"
593 + syspeer="$(/usr/sbin/ntpq -n -p | grep '^[*o]')"
597 diff -urN munin-2.0.17/plugins/node.d/ntp_states.in munin-2.0.17-plugins/plugins/node.d/ntp_states.in
598 --- munin-2.0.17/plugins/node.d/ntp_states.in 2013-07-19 18:30:03.000000000 +0200
599 +++ munin-2.0.17-plugins/plugins/node.d/ntp_states.in 2013-08-17 13:18:51.820919315 +0200
601 # 1 63933 931a yes yes none outlyer sys_peer 1
602 # 2 63934 943a yes yes none candidate sys_peer 3
604 - foreach my $line (`ntpq -c associations`) {
605 + foreach my $line (`/usr/sbin/ntpq -c associations`) {
606 if ($line =~ m/^\s*\d+/) {
607 my (undef, undef, $assid, undef, undef, undef, undef, $condition_str, undef, undef) = split(/\s+/, $line);
608 - chomp(my $peerinfo = `ntpq -n -c "readvar $assid srcadr"`);
609 + chomp(my $peerinfo = `/usr/sbin/ntpq -n -c "readvar $assid srcadr"`);
610 $peerinfo =~ s/\s//g;
611 my ($peer_addr) = ($peerinfo =~ m/srcadr=(.*)/);
613 @@ -125,17 +125,17 @@
616 if ($ARGV[0] and $ARGV[0] eq "autoconf") {
617 - `ntpq -c help >/dev/null 2>/dev/null`;
618 + `/usr/sbin/ntpq -c help >/dev/null 2>/dev/null`;
619 if ($CHILD_ERROR eq "0") {
620 - if (`ntpq -n -c peers | wc -l` > 0) {
621 + if (`/usr/sbin/ntpq -n -c peers | wc -l` > 0) {
625 - print "no (ntpq -p returned no peers)\n";
626 + print "no (/usr/sbin/ntpq -p returned no peers)\n";
630 - print "no (ntpq not found)\n";
631 + print "no (/usr/sbin/ntpq not found)\n";
635 diff -urN munin-2.0.17/plugins/node.d/nut_misc.in munin-2.0.17-plugins/plugins/node.d/nut_misc.in
636 --- munin-2.0.17/plugins/node.d/nut_misc.in 2013-07-19 18:30:03.000000000 +0200
637 +++ munin-2.0.17-plugins/plugins/node.d/nut_misc.in 2013-08-17 13:18:51.820919315 +0200
642 - upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha@127.0.0.1',
643 + upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha',
644 + upshost => $ENV{"upshost"} ? $ENV{"upshost"} : '127.0.0.1',
645 upsc => $ENV{"upsc"} ? $ENV{"upsc"} : 'upsc'
652 - 'battery_voltage' => {
653 - label => 'batt voltage - V',
657 'battery_runtime' => {
658 label => 'runtime - min',
663 if ( defined $ARGV[0] and $ARGV[0] eq 'config' ) {
664 - print "graph_title UPS Misc - $config{upsname}\n";
665 + my $s = $config{upsname};
667 + if ($config{upshost} ne "127.0.0.1" && $config{upshost} ne "localhost") {
668 + $s .= " at $config{upshost}";
670 + print "graph_title UPS Misc - $s\n";
671 #print "graph_args -l 110\n";
672 #print "graph_vlabel Misc\n";
673 foreach my $key (keys %graph) {
678 - my $data = `$config{upsc} $config{upsname}`;
679 + my $data = `$config{upsc} $config{upsname}\@$config{upshost}`;
680 while ($data =~ /([a-z.]+): (.+)\b/g) {
683 diff -urN munin-2.0.17/plugins/node.d/nut_volts.in munin-2.0.17-plugins/plugins/node.d/nut_volts.in
684 --- munin-2.0.17/plugins/node.d/nut_volts.in 2013-07-19 18:30:03.000000000 +0200
685 +++ munin-2.0.17-plugins/plugins/node.d/nut_volts.in 2013-08-17 13:18:51.820919315 +0200
690 - upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha@127.0.0.1',
691 + upsname => $ENV{"upsname"} ? $ENV{"upsname"} : 'bertha',
692 + upshost => $ENV{"upshost"} ? $ENV{"upshost"} : '127.0.0.1',
693 upsc => $ENV{"upsc"} ? $ENV{"upsc"} : 'upsc'
700 - 'input_voltage_maximum' => {
701 - label => 'max input seen',
705 - 'input_voltage_minimum' => {
706 - label => 'min input seen',
710 'output_voltage' => {
716 if ( defined $ARGV[0] and $ARGV[0] eq 'config' ) {
717 - print "graph_title UPS Voltages - $config{upsname}\n";
718 + my $s = $config{upsname};
720 + if ($config{upshost} ne "127.0.0.1" && $config{upshost} ne "localhost") {
721 + $s .= " at $config{upshost}";
723 + print "graph_title UPS Voltages - $s\n";
724 print "graph_args -l 115\n";
725 print "graph_vlabel Volts\n";
726 foreach my $key (keys %graph) {
731 - my $data = `$config{upsc} $config{upsname}`;
732 + my $data = `$config{upsc} $config{upsname}\@$config{upshost}`;
733 while ($data =~ /([a-z.]+): (.+)\b/g) {
736 diff -urN munin-2.0.17/plugins/node.d/perdition.in munin-2.0.17-plugins/plugins/node.d/perdition.in
737 --- munin-2.0.17/plugins/node.d/perdition.in 2013-07-19 18:30:03.000000000 +0200
738 +++ munin-2.0.17-plugins/plugins/node.d/perdition.in 2013-08-17 13:18:51.820919315 +0200
740 # Set the location of the perdition logs
741 PERDITION_LOG=${logfile:-/var/log/perdition.log}
742 OFFSET_FILE=${MUNIN_PLUGSTATE}/perdition.offset
743 -LOGTAIL=${logtail:-/usr/sbin/logtail}
744 +LOGTAIL=${logtail:-`which logtail`}
748 diff -urN munin-2.0.17/plugins/node.d/pop_stats.in munin-2.0.17-plugins/plugins/node.d/pop_stats.in
749 --- munin-2.0.17/plugins/node.d/pop_stats.in 2013-07-19 18:30:03.000000000 +0200
750 +++ munin-2.0.17-plugins/plugins/node.d/pop_stats.in 2013-08-17 13:18:51.820919315 +0200
752 if ($startsize < $pos)
755 - parseEximfile ($pop{'rotlogfile'}, $pos, (stat $pop{'rotlogfile'})[7]);
756 + if (-f $pop{'rotlogfile'}) {
757 + parseEximfile ($pop{'rotlogfile'}, $pos, (stat $pop{'rotlogfile'})[7]);
762 diff -urN munin-2.0.17/plugins/node.d/postgres_scans_.in munin-2.0.17-plugins/plugins/node.d/postgres_scans_.in
763 --- munin-2.0.17/plugins/node.d/postgres_scans_.in 2013-07-19 18:30:03.000000000 +0200
764 +++ munin-2.0.17-plugins/plugins/node.d/postgres_scans_.in 2013-08-17 13:18:51.820919315 +0200
766 vlabel => 'Scans / sec',
768 "SELECT COALESCE(sum(seq_scan),0) AS sequential, COALESCE(sum(idx_scan),0) AS index FROM pg_stat_user_tables",
769 - paramdatabase => 1,
772 "VALUES ('sequential','Sequential scans'), ('index','Index scans')",
773 diff -urN munin-2.0.17/plugins/node.d/postgres_tuples_.in munin-2.0.17-plugins/plugins/node.d/postgres_tuples_.in
774 --- munin-2.0.17/plugins/node.d/postgres_tuples_.in 2013-07-19 18:30:03.000000000 +0200
775 +++ munin-2.0.17-plugins/plugins/node.d/postgres_tuples_.in 2013-08-17 13:18:51.820919315 +0200
777 . " COALESCE(sum(n_tup_del),0) AS deleted FROM pg_stat_user_tables",
780 - paramdatabase => 1,
783 "VALUES ('seqread','Tuples sequentally read'), ('idxfetch','Tuples index fetched'), ('inserted','Tuples inserted'),"
784 diff -urN munin-2.0.17/plugins/node.d/slapd_.in munin-2.0.17-plugins/plugins/node.d/slapd_.in
785 --- munin-2.0.17/plugins/node.d/slapd_.in 2013-07-19 18:30:03.000000000 +0200
786 +++ munin-2.0.17-plugins/plugins/node.d/slapd_.in 2013-08-17 13:18:51.820919315 +0200
789 # Change these to reflect your LDAP ACL. The given DN must have
790 # read access to the Monitor branch.
791 -my $basedn = "cn=Monitor";
792 +my $basedn = ($ENV{'basedn'} || "cn=Monitor");
793 my $server = ($ENV{'server'} || 'localhost');
794 my $userdn = ($ENV{'binddn'} || '');
795 my $userpw = ($ENV{'bindpw'} || '');
796 diff -urN munin-2.0.17/plugins/node.d.linux/files_.in munin-2.0.17-plugins/plugins/node.d.linux/files_.in
797 --- munin-2.0.17/plugins/node.d.linux/files_.in 2013-07-19 18:30:03.000000000 +0200
798 +++ munin-2.0.17-plugins/plugins/node.d.linux/files_.in 2013-08-17 13:18:51.820919315 +0200
800 #%# capabilities=autoconf
803 -TMPFILE="$MUNIN_PLUGSTATE/munin-files_${PROC}.state"
804 +TMPFILE="@@PLUGSTATE@@/munin-files_${PROC}.state"
806 if [ "$1" = "autoconf" ]; then
807 if [ -x /usr/sbin/lsof ]; then
808 diff -urN munin-2.0.17/plugins/node.d.linux/iostat.in munin-2.0.17-plugins/plugins/node.d.linux/iostat.in
809 --- munin-2.0.17/plugins/node.d.linux/iostat.in 2013-08-17 13:19:03.504395523 +0200
810 +++ munin-2.0.17-plugins/plugins/node.d.linux/iostat.in 2013-08-17 13:18:51.994254767 +0200
812 if ($tmpnam =~ /\d+$/ and !$include_numbered) {
813 # Special case for devices like cXdXpX,
814 # like the cciss driver
815 - next unless $tmpnam =~ /\/c\d+d\d+$/
816 + next unless $tmpnam =~ /\/.*d\d+$/
818 next unless grep { $_ } @fields;
820 diff -urN munin-2.0.17/plugins/node.d.linux/ip_.in munin-2.0.17-plugins/plugins/node.d.linux/ip_.in
821 --- munin-2.0.17/plugins/node.d.linux/ip_.in 2013-07-19 18:30:03.000000000 +0200
822 +++ munin-2.0.17-plugins/plugins/node.d.linux/ip_.in 2013-08-17 13:18:51.820919315 +0200
823 @@ -127,14 +127,18 @@
824 # This is a fun hack to make the plugin ip6 compatible.
825 # Suggested in ticket #439 by "jodal".
828 + /usr/sbin/ip6tables "$@"
831 + *) eval 'iptables() {
832 + /usr/sbin/iptables "$@"
837 if [[ "$1" == "autoconf" ]]; then
838 if [[ -r /proc/net/dev ]]; then
839 - if ! iptables -L ${INPUT} -v -n -x >/dev/null 2>/dev/null; then
840 + if ! /usr/sbin/iptables -L ${INPUT} -v -n -x >/dev/null 2>/dev/null; then
841 echo "no (could not run iptables as user $(whoami))"
844 @@ -147,10 +151,10 @@
848 -if [[ "$1" == "suggest" ]]; then
849 - iptables -L ${INPUT} -v -n -x 2>/dev/null | awk --posix '$8 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}$/ { if (done[$8]!=1) {print $8; done[$8]=1;}}'
850 - if [[ -x /sbin/ip6tables ]]; then
851 - ip6tables -L ${INPUT} -v -n -x 2>/dev/null | awk --posix '$7 ~ /\/128$/ { if (done[$7]!=1) {a=$7;gsub(/\/128$/, "", a); print a; done[$7]=1;}}'
852 +if [ "$1" = "suggest" ]; then
853 + /usr/sbin/iptables -L ${INPUT} -v -n -x 2>/dev/null | awk --posix '$8 ~ /^([0-9]{1,3}\.){3}[0-9]{1,3}$/ { if (done[$8]!=1) {print $8; done[$8]=1;}}'
854 + if [[ -x /usr/sbin/ip6tables ]]; then
855 + /usr/sbin/ip6tables -L ${INPUT} -v -n -x 2>/dev/null | awk --posix '$7 ~ /\/128$/ { if (done[$7]!=1) {a=$7;gsub(/\/128$/, "", a); print a; done[$7]=1;}}'
861 # Escape .'s so they don't match _everything_?
862 IP=$(echo $IP | sed 's~\.~\\.~g')
863 -iptables -L ${INPUT} -v -n -x | awk "/$IP"'[ /]/ { print "in.value " $2; exit 0; }'
864 -iptables -L ${OUTPUT} -v -n -x | awk "/$IP"'[ /]/ { print "out.value " $2; exit 0; }'
865 +/usr/sbin/iptables -L ${INPUT} -v -n -x | awk "/$IP"'[ \/]/ { print "in.value " $2; exit 0; }'
866 +/usr/sbin/iptables -L ${OUTPUT} -v -n -x | awk "/$IP"'[ \/]/ { print "out.value " $2; exit 0; }'
867 diff -urN munin-2.0.17/plugins/node.d.linux/load.in munin-2.0.17-plugins/plugins/node.d.linux/load.in
868 --- munin-2.0.17/plugins/node.d.linux/load.in 2013-07-19 18:30:03.000000000 +0200
869 +++ munin-2.0.17-plugins/plugins/node.d.linux/load.in 2013-08-17 13:18:51.820919315 +0200
871 # one machine answer for several)
873 # The title of the graph
874 - echo 'graph_title Load average'
875 + echo "graph_title Load average"
876 # Arguments to "rrdtool graph". In this case, tell it that the
877 # lower limit of the graph is '0', and that 1k=1000 (not 1024)
878 - echo 'graph_args --base 1000 -l 0'
879 + echo "graph_args --base 1000 -l 0"
881 - echo 'graph_vlabel load'
882 + echo "graph_vlabel load"
883 # We want Cur/Min/Avg/Max unscaled (i.e. 0.42 load instead of
885 - echo 'graph_scale no'
886 + echo "graph_scale no"
887 # Graph category. Defaults to 'other'
888 - echo 'graph_category system'
889 + echo "graph_category system"
890 # The fields. "label" is used in the legend. "label" is the only
892 - echo 'load.label load'
893 + echo "load.label load"
894 # These two read the environment for warning values for the field
895 # "load". If "load_warning" or "warning" aren't set in the
896 # environment, no warning levels are set. Likewise for "load_critical"
898 # This one is purely to add an explanation to the web page. The first
899 # one is for the graph itself, while the second one is for the field
901 - echo 'graph_info The load average of the machine describes how many processes are in the run-queue (scheduled to run "immediately").'
902 - echo 'load.info 5 minute load average'
903 + echo "graph_info The load average of the machine describes how many processes are in the run-queue (scheduled to run \"immediately\")."
904 + echo "load.info 5 minute load average"
906 # Last, if run with the "config"-parameter, quit here (don't
908 diff -urN munin-2.0.17/plugins/node.d.linux/nfs_client.in munin-2.0.17-plugins/plugins/node.d.linux/nfs_client.in
909 --- munin-2.0.17/plugins/node.d.linux/nfs_client.in 2013-07-19 18:30:03.000000000 +0200
910 +++ munin-2.0.17-plugins/plugins/node.d.linux/nfs_client.in 2013-08-17 13:18:51.820919315 +0200
912 proc="getattr setattr lookup access readlink read write create mkdir symlink mknod remove rmdir rename link readdir readdirplus fsstat fsinfo pathconf commit"
914 if [ "$1" = "autoconf" ]; then
915 - if [ -f "$NFS" ]; then
916 + if [ -r "$NFS" ]; then
925 - split("'"$proc"'", names)
928 - printf("%s.value %d\n", names[++i], values[i+3]);
964 + nfs_readdirplus+=$20
971 + print "getattr.value " nfs_getattr
972 + print "setattr.value " nfs_setattr
973 + print "lookup.value " nfs_lookup
974 + print "access.value " nfs_access
975 + print "readlink.value " nfs_readlink
976 + print "read.value " nfs_read
977 + print "write.value " nfs_write
978 + print "create.value " nfs_create
979 + print "mkdir.value " nfs_mkdir
980 + print "symlink.value " nfs_symlink
981 + print "mknod.value " nfs_mknod
982 + print "remove.value " nfs_remove
983 + print "rmdir.value " nfs_rmdir
984 + print "rename.value " nfs_rename
985 + print "link.value " nfs_link
986 + print "readdir.value " nfs_readdir
987 + print "readdirplus.value " nfs_readdirplus
988 + print "fsstat.value " nfs_fsstat
989 + print "fsinfo.value " nfs_fsinfo
990 + print "pathconf.value " nfs_pathconf
991 + print "commit.value " nfs_commit
994 diff -urN munin-2.0.17/plugins/node.d.linux/nfsd.in munin-2.0.17-plugins/plugins/node.d.linux/nfsd.in
995 --- munin-2.0.17/plugins/node.d.linux/nfsd.in 2013-07-19 18:30:03.000000000 +0200
996 +++ munin-2.0.17-plugins/plugins/node.d.linux/nfsd.in 2013-08-17 13:18:51.820919315 +0200
998 proc="getattr setattr lookup access readlink read write create mkdir symlink mknod remove rmdir rename link readdir readdirplus fsstat fsinfo pathconf commit"
1000 if [ "$1" = "autoconf" ]; then
1001 - if [ -f "$NFSD" ]; then
1002 + if [ -r "$NFSD" ]; then
1011 - split("'"$proc"'", names)
1014 - printf("%s.value %d\n", names[++i], values[i+3]);
1050 + nfs_readdirplus+=$20
1057 + print "getattr.value " nfs_getattr
1058 + print "setattr.value " nfs_setattr
1059 + print "lookup.value " nfs_lookup
1060 + print "access.value " nfs_access
1061 + print "readlink.value " nfs_readlink
1062 + print "read.value " nfs_read
1063 + print "write.value " nfs_write
1064 + print "create.value " nfs_create
1065 + print "mkdir.value " nfs_mkdir
1066 + print "symlink.value " nfs_symlink
1067 + print "mknod.value " nfs_mknod
1068 + print "remove.value " nfs_remove
1069 + print "rmdir.value " nfs_rmdir
1070 + print "rename.value " nfs_rename
1071 + print "link.value " nfs_link
1072 + print "readdir.value " nfs_readdir
1073 + print "readdirplus.value " nfs_readdirplus
1074 + print "fsstat.value " nfs_fsstat
1075 + print "fsinfo.value " nfs_fsinfo
1076 + print "pathconf.value " nfs_pathconf
1077 + print "commit.value " nfs_commit
1079 diff -urN munin-2.0.17/plugins/node.d.linux/vlan_inetuse_.in munin-2.0.17-plugins/plugins/node.d.linux/vlan_inetuse_.in
1080 --- munin-2.0.17/plugins/node.d.linux/vlan_inetuse_.in 2013-07-19 18:30:03.000000000 +0200
1081 +++ munin-2.0.17-plugins/plugins/node.d.linux/vlan_inetuse_.in 2013-08-17 13:18:51.820919315 +0200
1084 my %out_octets = ();
1086 -open (IN, "/sbin/iptables -v -x -L $INTERFACE-in |") or
1087 - die "Could not run iptables: $!\n";
1088 +open (IN, "/usr/sbin/iptables -v -x -L $INTERFACE-in |") or
1089 + die "Could not run /usr/sbin/iptables: $!\n";
1092 if (/^\s*\d+\s+(\d+) +([a-z]+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+(?:\s+|)(.+|)$/)
1097 -die "Error running iptables. Dying\n" if $?;
1098 +die "Error running /usr/sbin/iptables. Dying\n" if $?;
1100 -open (IN, "/sbin/iptables -v -x -L $INTERFACE-out |") or
1101 - die "Could not run iptables: $!\n";
1102 +open (IN, "/usr/sbin/iptables -v -x -L $INTERFACE-out |") or
1103 + die "Could not run /usr/sbin/iptables: $!\n";
1106 if (/^\s*\d+\s+(\d+) +([a-z]+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+(?:\s+|)(.+|)$/)
1111 -die "Error running iptables. Dying\n" if $?;
1112 +die "Error running /usr/sbin/iptables. Dying\n" if $?;
1114 if ($ARGV[0] and $ARGV[0] eq "config")
1116 diff -urN munin-2.0.17/plugins/node.d.linux/vlan_linkuse_.in munin-2.0.17-plugins/plugins/node.d.linux/vlan_linkuse_.in
1117 --- munin-2.0.17/plugins/node.d.linux/vlan_linkuse_.in 2013-07-19 18:30:03.000000000 +0200
1118 +++ munin-2.0.17-plugins/plugins/node.d.linux/vlan_linkuse_.in 2013-08-17 13:18:51.820919315 +0200
1121 my %out_octets = ();
1123 -open (IN, "/sbin/iptables -v -x -L $INTERFACE-in |") or
1124 - die "Could not run iptables: $!\n";
1125 +open (IN, "/usr/sbin/iptables -v -x -L $INTERFACE-in |") or
1126 + die "Could not run /usr/sbin/iptables: $!\n";
1129 if (/^\s*\d+\s+(\d+) +([a-z]+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+(?:\s+|)(.+|)$/)
1134 -die "Error running iptables. Dying\n" if $?;
1135 +die "Error running /usr/sbin/iptables. Dying\n" if $?;
1137 -open (IN, "/sbin/iptables -v -x -L $INTERFACE-out |") or
1138 - die "Could not run iptables: $!\n";
1139 +open (IN, "/usr/sbin/iptables -v -x -L $INTERFACE-out |") or
1140 + die "Could not run /usr/sbin/iptables: $!\n";
1143 if (/^\s*\d+\s+(\d+) +([a-z]+)\s+\S+\s+\S+\s+\S+\s+\S+\s+\S+(?:\s+|)(.+|)$/)
1148 -die "Error running iptables. Dying\n" if $?;
1149 +die "Error running /usr/sbin/iptables. Dying\n" if $?;
1151 diff -urN munin-2.0.17/plugins/node.d.linux/vserver_resources.in munin-2.0.17-plugins/plugins/node.d.linux/vserver_resources.in
1152 --- munin-2.0.17/plugins/node.d.linux/vserver_resources.in 2013-07-19 18:30:03.000000000 +0200
1153 +++ munin-2.0.17-plugins/plugins/node.d.linux/vserver_resources.in 2013-08-17 13:18:51.820919315 +0200
1154 @@ -245,6 +245,12 @@
1155 echo 'graph_vlabel ANON pages'
1156 echo 'graph_info Shows anonymous memory (human readable) used by each vserver.'
1159 + echo 'graph_title Mapped memory used by vserver'
1160 + echo 'graph_args --base 1024k -l 0'
1161 + echo 'graph_vlabel RMAP pages'
1162 + echo 'graph_info Shows mapped memory (human readable) used by each vserver.'
1165 echo 'graph_title Files used by vserver'
1166 echo 'graph_args --base 1024k -l 0'
1167 @@ -281,6 +287,30 @@
1168 echo 'graph_vlabel SHM pages'
1169 echo 'graph_info Shows shared memory (human readable) used by each vserver.'
1172 + echo 'graph_title Semaphore arrays used by vserver'
1173 + echo 'graph_args --base 1024k -l 0'
1174 + echo 'graph_vlabel Semaphore arrays'
1175 + echo 'graph_info Shows semaphore arrays used by each vserver.'
1178 + echo 'graph_title Semaphores used by vserver'
1179 + echo 'graph_args --base 1024k -l 0'
1180 + echo 'graph_vlabel Semaphores'
1181 + echo 'graph_info Shows semaphores used by each vserver.'
1184 + echo 'graph_title dentry structs used by vserver'
1185 + echo 'graph_args --base 1024k -l 0'
1186 + echo 'graph_vlabel dentry structs'
1187 + echo 'graph_info Shows dentry structs used by each vserver.'
1190 + echo 'graph_title Resources used by vserver'
1191 + echo 'graph_args --base 1024k -l 0'
1192 + echo 'graph_vlabel Resources'
1193 + echo 'graph_info Shows rsources used by each vserver.'
1196 echo "$RESOURCE not defined."
1198 @@ -299,53 +329,108 @@
1202 - echo "$NAME.label $LABEL: processes"
1203 - echo "$NAME.info Number of processes used by $LABEL."
1204 + echo "${NAME}_PROC.label $LABEL: processes"
1205 + echo "${NAME}_PROC.info Number of processes used by $LABEL."
1208 - echo "$NAME.label $LABEL: Virtual memory"
1209 - echo "$NAME.info Size of virtual memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1210 - echo "$NAME.cdef $NAME,$pagesize,*"
1211 + echo "${NAME}_VM.label $LABEL: Virtual memory"
1212 + echo "${NAME}_VM.info Size of virtual memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1213 + echo "${NAME}_VM.cdef ${NAME}_VM,$pagesize,*"
1216 - echo "$NAME.label $LABEL: Locked memory"
1217 - echo "$NAME.info Size of locked memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1218 - echo "$NAME.cdef $NAME,$pagesize,*"
1219 + echo "${NAME}_VML.label $LABEL: Locked memory"
1220 + echo "${NAME}_VML.info Size of locked memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1221 + echo "${NAME}_VML.cdef ${NAME}_VML,$pagesize,*"
1224 - echo "$NAME.label $LABEL: Resident set size"
1225 - echo "$NAME.info Size of resident set size used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1226 - echo "$NAME.cdef $NAME,$pagesize,*"
1227 + echo "${NAME}_RSS.label $LABEL: Resident set size"
1228 + echo "${NAME}_RSS.info Size of resident set size used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1229 + echo "${NAME}_RSS.cdef ${NAME}_RSS,$pagesize,*"
1232 - echo "$NAME.label $LABEL: Anonymous memory"
1233 - echo "$NAME.info Size of anonymous memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1234 - echo "$NAME.cdef $NAME,$pagesize,*"
1235 + echo "${NAME}_ANON.label $LABEL: Anonymous memory"
1236 + echo "${NAME}_ANON.info Size of anonymous memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1237 + echo "${NAME}_ANON.cdef ${NAME}_ANON,$pagesize,*"
1240 + echo "${NAME}_RMAP.label $LABEL: Mapped memory"
1241 + echo "${NAME}_RMAP.info Size of mapped memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1242 + echo "${NAME}_RMAP.cdef ${NAME}_RMAP,$pagesize,*"
1245 - echo "$NAME.label $LABEL: Files"
1246 - echo "$NAME.info Number of files used by $LABEL."
1247 + echo "${NAME}_FILES.label $LABEL: Files"
1248 + echo "${NAME}_FILES.info Number of files used by $LABEL."
1251 - echo "$NAME.label $LABEL: Open filedescriptors"
1252 - echo "$NAME.info Number of open filedescriptors used by $LABEL."
1253 + echo "${NAME}_OFD.label $LABEL: Open filedescriptors"
1254 + echo "${NAME}_OFD.info Number of open filedescriptors used by $LABEL."
1257 - echo "$NAME.label $LABEL: Locks"
1258 - echo "$NAME.info Number of locks used by $LABEL."
1259 + echo "${NAME}_LOCKS.label $LABEL: Locks"
1260 + echo "${NAME}_LOCKS.info Number of locks used by $LABEL."
1263 - echo "$NAME.label $LABEL: Sockets"
1264 - echo "$NAME.info Number of sockets used by $LABEL."
1265 + echo "${NAME}_SOCK.label $LABEL: Sockets"
1266 + echo "${NAME}_SOCK.info Number of sockets used by $LABEL."
1269 - echo "$NAME.label $LABEL: Message queues"
1270 - echo "$NAME.info Number of message queues used by $LABEL."
1271 + echo "${NAME}_MSGQ.label $LABEL: Message queues"
1272 + echo "${NAME}_MSGQ.info Number of message queues used by $LABEL."
1275 - echo "$NAME.label $LABEL: Shared memory"
1276 - echo "$NAME.info Size of shared memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1277 - echo "$NAME.cdef $1,$pagesize,*"
1278 + echo "${NAME}_SHM.label $LABEL: Shared memory"
1279 + echo "${NAME}_SHM.info Size of shared memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1280 + echo "${NAME}_SHM.cdef ${NAME}_SHM,$pagesize,*"
1283 + echo "${NAME}_SEMA.label $LABEL: Semaphore arrays"
1284 + echo "${NAME}_SEMA.info Number of semaphore arrays used by $LABEL."
1287 + echo "${NAME}_SEMS.label $LABEL: Semaphores"
1288 + echo "${NAME}_SEMS.info Number of semaphores used by $LABEL."
1291 + echo "${NAME}_DENT.label $LABEL: dentry structs"
1292 + echo "${NAME}_DENT.info Number of dentries used by $LABEL."
1295 + echo "${NAME}_PROC.label $LABEL: processes"
1296 + echo "${NAME}_PROC.info Number of processes used by $LABEL."
1297 + echo "${NAME}_VM.label $LABEL: Virtual memory"
1298 + echo "${NAME}_VM.info Size of virtual memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1299 + echo "${NAME}_VM.cdef ${NAME}_VM,$pagesize,*"
1300 + echo "${NAME}_VML.label $LABEL: Locked memory"
1301 + echo "${NAME}_VML.info Size of locked memory used by $LABEL. (Number multipled by $pagesize to make it human readable)"
1302 + echo "${NAME}_VML.cdef ${NAME}_VML,$pagesize,*"
1303 + echo "${NAME}_RSS.label $LABEL: Resident set size"
1304 + echo "${NAME}_RSS.info Size of resident set size used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1305 + echo "${NAME}_RSS.cdef ${NAME}_RSS,$pagesize,*"
1306 + echo "${NAME}_ANON.label $LABEL: Anonymous memory"
1307 + echo "${NAME}_ANON.info Size of anonymous memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1308 + echo "${NAME}_ANON.cdef ${NAME}_ANON,$pagesize,*"
1309 + echo "${NAME}_RMAP.label $LABEL: Mapped memory"
1310 + echo "${NAME}_RMAP.info Size of mapped memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1311 + echo "${NAME}_RMAP.cdef ${NAME}_RMAP,$pagesize,*"
1312 + echo "${NAME}_FILES.label $LABEL: Files"
1313 + echo "${NAME}_FILES.info Number of files used by $LABEL."
1314 + echo "${NAME}_OFD.label $LABEL: Open filedescriptors"
1315 + echo "${NAME}_OFD.info Number of open filedescriptors used by $LABEL."
1316 + echo "${NAME}_LOCKS.label $LABEL: Locks"
1317 + echo "${NAME}_LOCKS.info Number of locks used by $LABEL."
1318 + echo "${NAME}_SOCK.label $LABEL: Sockets"
1319 + echo "${NAME}_SOCK.info Number of sockets used by $LABEL."
1320 + echo "${NAME}_MSGQ.label $LABEL: Message queues"
1321 + echo "${NAME}_MSGQ.info Number of message queues used by $LABEL."
1322 + echo "${NAME}_SHM.label $LABEL: Shared memory"
1323 + echo "${NAME}_SHM.info Size of shared memory used by $LABEL. (Number multiplied by $pagesize to make it human readable)"
1324 + echo "${NAME}_SHM.cdef ${NAME}_SHM,$pagesize,*"
1325 + echo "${NAME}_SEMA.label $LABEL: Semaphore arrays"
1326 + echo "${NAME}_SEMA.info Number of semaphore arrays used by $LABEL."
1327 + echo "${NAME}_SEMS.label $LABEL: Semaphores"
1328 + echo "${NAME}_SEMS.info Number of semaphores used by $LABEL."
1329 + echo "${NAME}_DENT.label $LABEL: dentry structs"
1330 + echo "${NAME}_DENT.info Number of dentries used by $LABEL."
1333 echo "$RESOURCE not defined."
1335 if [ ! -z "$LIMITS" -a "$LIMITS" = 1 ]; then
1336 LIMIT=`cat /proc/virtual/$xid/limit | grep $RESOURCE | cut -f4`
1337 if [ ${LIMIT:-0} -gt 0 ]; then
1338 - echo "$NAME.critical $LIMIT"
1339 + echo "${NAME}_${RESOURCE}.critical $LIMIT"
1343 @@ -367,8 +452,15 @@
1344 for xid in $XIDS ; do
1345 LABEL=`cat /proc/virtual/$xid/$NAMELOC |grep NodeName |cut -f2`
1346 NAME=`echo $LABEL | cut -d. -f1 | tr '-' '_'`
1347 - cat /proc/virtual/$xid/limit | awk -v name="${NAME}" -v resource="${RESOURCE}:" \
1348 - '{ if ( $1 == resource )
1349 - printf "%s.value %d\n", name, $2 }'
1350 + if [ $RESOURCE = "ALL" ]; then
1351 + cat /proc/virtual/$xid/limit | awk -v name="${NAME}" \
1352 + '{ if ( $1 ~ /[A-Z]*:/ ) {
1353 + resource = $1 ; gsub(/:/, "", resource);
1354 + printf "%s_%s.value %d\n", name, resource, $2
1357 + cat /proc/virtual/$xid/limit | awk -v name="${NAME}" -v resource="${RESOURCE}" \
1358 + '{ if ( $1 ~ resource )
1359 + printf "%s_%s.value %d\n", name, resource, $2 }'