Skip to content

Commit

Permalink
The linux/iostat plugin now ignores devices without traffic (Deb#2671…
Browse files Browse the repository at this point in the history
…95).
  • Loading branch information
jomono committed Nov 20, 2004
1 parent 5a6c4d1 commit b1e3e7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ munin (work)
* Added plugin generic/loggrep for generic log grepping.
* Fixed bug in generic/sendmail_mailqueue, when queue is empty.
* Fixed bug in generic/hddtemp2, patch by arturaz (SF#1037002).
* Added new plugin linux/forks, to graph forks per second.
* Added new plugin linux/forks, to graph forks per second.
* The linux/iostat plugin now ignores devices without traffic (Deb#267195).

- Installation
* Changed variable name of ARCH to OSTYPE, to avoid name crash on newer
Expand Down
13 changes: 6 additions & 7 deletions node/node.d.linux/iostat.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
# autoconf (optional - used by lrrd-config)
#
# $Log$
# Revision 1.10 2004/11/20 23:58:22 jimmyo
# The linux/iostat plugin now ignores devices without traffic (Deb#267195).
#
# Revision 1.9 2004/09/25 22:29:16 jimmyo
# Added info fields to a bunch of plugins.
#
Expand Down Expand Up @@ -104,7 +107,7 @@ if ( $ARGV[0] and $ARGV[0] eq "config")
print "graph_args --base 1024 -l 0\n";
print "graph_vlabel blocks per second read (-) / written (+)\n";
print "graph_category disk\n";
print "graph_total Total\n";
print "graph_total Total\n" if (keys (%devs) > 1);
print "graph_info This graph shows the I/O to and from block devices.\n";
print "graph_order";
foreach my $key (sort by_dev keys %devs)
Expand Down Expand Up @@ -185,12 +188,8 @@ sub fetch_detailed()
my @fields = split(/\s+/, $3);
my $tmpnam = $2;
my $major = $1;
next if ($major == 1); # RAM devices
next if ($major == 9); # MD devices
next if ($major == 58); # LVM devices
next if ($major == 254); # LVM2 devices
next if ($tmpnam =~ /part\d+$/);
next if ($tmpnam =~ /^\s*(?:sd|hd)[a-z]\d+\s*$/);
next if ($tmpnam =~ /\d+$/);
next unless grep { $_ } @fields;

$tmpnam =~ s/\/[[:alpha:]]+(\d+)/\/$1/g;
$tmpnam =~ s/^([^\/]+)\//$1/;
Expand Down

0 comments on commit b1e3e7f

Please sign in to comment.