Linux

check_disk_io_stats

Description:

Check IO and IOPS for a device on a linux system. This check uses the /sys/block/device/stat file to calculate disk stats during a given period of time. Provides perfdata so it can be graphed.

Current Version

1.01

Last Release Date

2013-10-25

Compatible With

  • Nagios 3.x

Owner

License

GPL


Project Files
Project Notes
This is a python rewrite of a few shell and perl versionns that I found in the exchange. I think it is simpler than the perl and more robust than the shell ones. There are ample comments in the script, but here is what it looks like when you run it with the verbose option. [nagios@stage-ha1-db01 libexec]$ ./check_disk_io_stats --help Usage: check_disk_io_stats [options] Calculate disk io statistics based on /sys/block//stat. Options: --version show program's version number and exit -h, --help show this help message and exit -d DEVICE device name listed under /sys/block -s STATS_TYPE type of disk statistic to check, valid values are io and iops -f STATS_FILE path to the file containing historical statistics -w WARN warn threshold -c CRITICAL critical threshold -v print verbose output [nagios@stage-ha1-db01 libexec]$ ./check_disk_io_stats -d drbd0 -f /tmp/drbd_io_stat.tmp -s io -w 500 -c 1000 -v [User Arguments] critical 1000 device drbd0 stats_file /tmp/drbd_io_stat.tmp stats_type io verbose True warn 500 [Stats File] write 0 read 0 epoch 1380145289 offset na device drbd0 total na stats_type io tstamp Sep-25-2013 02:41 PM [Device File] write 0 read 0 epoch 1380145315 offset na device drbd0 total na stats_type io tstamp Sep-25-2013 02:41 PM [Delta] write 0 read 0 epoch 1380145315 offset 26 device drbd0 total 0 stats_type io tstamp Sep-25-2013 02:41 PM OK - device: drbd0, interval: 26sec, read(mb)/write(mb)/total(mb): 0/0/0 warn/critical: 500/1000|readio=0, writeio=0, totalio=0
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
1 (1)
Favorites
0
Views
32,419