- check_iostat: pass warning and critical level to perfdata

- use iostat fields r/s and w/s for tps calculation

OBS-URL: https://build.opensuse.org/package/show/server:monitoring/monitoring-plugins-sar-perf?expand=0&rev=11
This commit is contained in:
Ruediger Oertel 2017-11-14 16:28:21 +00:00 committed by Git OBS Bridge
parent 6e8dcaed67
commit 77bb1e171a
2 changed files with 8 additions and 2 deletions

View File

@ -33,7 +33,7 @@ sub VERSION_MESSAGE {
sub HELP_MESSAGE {
print "\n\tThis plugin shows the I/O usage of the specified disk, using the iostat external program.\n";
print "\tIt prints three statistics: Transactions per second (tps), Kilobytes per second\n";
print "tread from the disk (KB_read/s) and and written to the disk (KB_written/s)\n\n";
print "read from the disk (KB_read/s) and and written to the disk (KB_written/s)\n\n";
print "$progname:\n\t-d <disk>\t\tDevice to be checked (without the full path, eg. sda)\n";
print "\t\t\t\t(also accepted are device mapper names)\n";
print "\t-c <tps>,<read>,<wrtn>\tSets the CRITICAL level for tps, KB_read/s and KB_written/s, respectively\n";
@ -121,7 +121,7 @@ while (<IOSTAT>) {
$seen_disk++;
next if $seen_disk < 2;
my (@stats) = split ('\s+', $_);
($rps,$wps,$kbread,$kbwritten,$util) = @stats[1,2,5,6,13];
($rps,$wps,$kbread,$kbwritten,$util) = @stats[3,4,5,6,13];
$tps = $rps + $wps;
last;
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Nov 14 17:27:19 CET 2017 - ro@suse.de
- check_iostat: pass warning and critical level to perfdata
- use iostat fields r/s and w/s for tps calculation
-------------------------------------------------------------------
Mon Apr 24 12:33:08 CEST 2017 - ro@suse.de