iostat_reporter
is a disk monitoring and reporting script. It uses iostat for monitoring and gnuplot to generate iostat graphical reports.
You need to install the following before you can use iostart_retporter:
- iostat (usually included in sysstat package in linux distributions)
- gnuplot
In order to monitor and collect disk statistics you can use iostat_reporter in monitoring mode.
Use -m parameter to monitor the specified disk using iostat exteded mode.
e.g.
./iostat_reporter.sh -m sda
This will log statistics in iostat.log file. Each line of the produced file contains a timestamp and all disk metrics of iostat extended statistics. e.g.
2019-02-03 14:55:08 sda 0,03 9,73 0,29 9,77 0,01 0,24 51,17 0,85 84,91 17,06 86,91 7,20 7,24
2019-02-03 14:55:10 sda 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00 0,00
2019-02-03 14:55:12 sda 0,00 22,00 0,00 2,00 0,00 0,09 96,00 0,04 20,00 0,00 20,00 20,00 4,00
In monitoring mode you can set the following optional parameters:
-i interval
to set the amount of time in seconds between each report. Default value is 2 seconds.
-o outfile
to set the output log file. Default is iostat.log
You can use -r parameter to plot disk metrics collected by iostat. Iostat_reporter with create a folder containing the graphs and an html file that the overall report. If the input file has not been generated by iostat_reporter, it must have the format described above. e.g.
./iostat_reporter -r iostat.log
will create an iostat_report folder containing all graphs and io_stat.html with the report.
Usage: ./iostat_reporter.sh
-h Print this help message.
-m disk Monitor mode. Collects io statistics using iostat extended mode. Use -d option to select the disk device to monitor.
-o output The output file to log iostat metrics when in monitor mode. Default iostat.log
-i interval Specifies the amount of time in seconds between each report. Used in monior mode. Default 2 seconds
-p file Generate graphical report based on collected iostat data and logged in file. The format of the file requires data and time at the begginning of each line. The tool will create a folder containing and html with the report.