
=pod

=head1 NAME

C<check_diskio> - a Nagios plugin to monitor the amount of disk I/O in sectors
on Linux


=head1 DESCRIPTION

check_diskio is a Nagios plugin to monitor the amount of disk I/O in sectors
on Linux

=head1 VERSION

Version 3.2.8

=head1 SYNOPSIS

 check_diskio --device=devicename --critical=critical --warning=warning
             [--help] [--reset] [--silent] [--ssize=size]
             [--verbose] [--version] [--uom=unit] [--factor=unit]

 -?, --usage   Print usage information
 -h, --help
   Print detailed help screen
 -V, --version
   Print version information
 --extra-opts=[<section>[@<config_file>]]
   Section and/or config_file from which to load extra options (may repeat)
 -d, --device=STRING
   device name(s) (or mount point(s))
 --debug
   prints debugging information
 -c, --critical=INTEGER
   critical number of sectors/s
 -w, --warning=INTEGER
   number of sectors/s which generates a warning
 -r, --reset
   reset the counter(s)
 -s, --silent
   no warnings or critials are issued
 --ssize=INTEGER
   specify the sector size in bytes (default 512)
 --uom=STRING
   unit of measurement
 --factor=STRING
   unit of threshold
 -t, --timeout=INTEGER
   Seconds before plugin times out (default: 15)
 --testfile=STRING
   Tests the plugin with the given disk statistics file
 -v, --verbose
   Show details for command-line debugging (can repeat up to 3 times)

 Units of measurement:

 unit                       description
 ---------------------------------------------
   
 sector,sectors,s           sectors/s
 bit,bits,b        bps      bits per second
 byte,bytes,B      Bps      bytes per second

 Units of thresholds:

 unit                       description
 ---------------------------------------------
  
 Ki,Kibi                    kilo binary
 Mi,Mebi                    mega binary
 Gi,Gibi                    giga binary
 K,kilo                     kilo
 M,mega                     mega
 G,giga                     giga

=head1 REQUIRED ARGUMENTS

--device, --critical and --warning

=head1 OPTIONS

 -?, --usage   Print usage information
 -h, --help
   Print detailed help screen
 -V, --version
   Print version information
 --extra-opts=[<section>[@<config_file>]]
   Section and/or config_file from which to load extra options (may repeat)
 -r, --reset
   reset the counter(s)
 -s, --silent
   no warnings or critials are issued
 --ssize=INTEGER
   specify the sector size in bytes (default 512)
 --uom=STRING
   unit of measurement
 --factor=STRING
   unit of threshold
 -t, --timeout=INTEGER
   Seconds before plugin times out (default: 15)
 -v, --verbose
   Show details for command-line debugging (can repeat up to 3 times)
 --debug
   Shows debugging information

=head1 EXAMPLE

check_diskio --warning=102400 --critical=122880 --device=hda

check_diskio checks if the I/O for /dev/hda will stay below the given
critical and warning values

=head1 DIAGNOSTICS

You can specify multiple --verbose options to increase the program
verbosity. With --debug the script will generate detailed information
to be submitted along with bug reports.

=head1 EXIT STATUS

0 if OK, 1 in case of a warning, 2 in case of a critical status and 3
in case of an unknown problem

=head1 DEPENDENCIES

check_diskio depends on

=over 4

=item * Array::Unique

=item * English

=item * File::Slurp

=item * List::MoreUtils

=item * Monitoring::Plugin (or Nagios::Plugin)

=item * Monitoring::Plugin::Getopt(or Nagios::Plugin::Getopt)

=item * Monitoring::Plugin::Threshold (or Nagios::Plugin::Threshold)

=item * Number::Format

=item * POSIX

=item * Readonly

=item * version

=back

=head1 CONFIGURATION

=head1 INCOMPATIBILITIES

None reported.

=head1 SEE ALSO

Nagios documentation

=head1 BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to matteo@corti.li,
or through the web interface at
https://svn.id.ethz.ch/trac/bd_webhosting/newticket

Include the output of the script with the --debug command line option

=head1 AUTHOR

Matteo Corti <matteo@corti.li>

=head1 LICENSE AND COPYRIGHT

Copyright (c) 2007-2010, ETH Zurich.

This module is free software; you can redistribute it and/or modify it
under the terms of GNU general public license (gpl) version 3.
See the LICENSE file for details.

=head1 DISCLAIMER OF WARRANTY

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND,
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.

=head1 ACKNOWLEDGMENTS

Many thanks to

=over 4

=item * Jeff Potter for pointing out an overflow problem

=item * Wilco for the RAID patch

=item * Toni Van Remortel for the UOM correction and suggestions

=item * Simon Kuhn for HP Smart Array cards fix

=item * Nikolaus Filus for the UOM enhancements

=back

