踊る犬.netブログ (旧)

Nagios plugin for checking I/O statistics of all disks

https://gist.github.com/noradaiko/5476125.js

Requisites

It requires iostat and bc installed on your computer.

Usage

./check_all_iostat -w tps,read,write -c tps,read,write

-w/c TPS,READ,WRITE TPS means transfer per seconds (aka IO/s)
READ and WRITE are in KBytes per seconds

Example

./check_all_iostat -w 200,100000,100000 -c 300,200000,200000

It will output something like:

OK - I/O stats tps=0.860000 KB_read/s=0.110000 KB_written/s=4.550000 | 'tps'=0.860000; 'KB_read/s'=0.110000; 'KB_written/s'=4.550000;

Note

This plugin is based on check_iostat – I/O statistics. Thanks, Thiago Varela.