This tool, iostat_plotter.py simply takes the output from iotstat, parsers the data to some degree, and creates plots and an HTML report. The intent is to allow plot the time history of the IO rather than have to stare at numbers flashing by on the command line.
There are several versions of iostat_plotter. The first version, iostat_plotter_article.py below corresponds to the version used in the article in HPC-Admin magazine, (here), and can be downloaded. The second version, iostat_plotter.py is an enhanced version that can capture and plot data for more than one device. It also has a serialization capability (“pickle” in Python-speak) that allows you to save the data structures for use elsewhere.
Both versions are covered under the GPLv2 license.
This version is labeled “iostat_plotter_article.py”. This corresponds to the version in the HPC-Admin Magazine article.
This script can only examine one device at a time. You need to get the iostat output using the command
[laytonj@home8 IOSTAT]$ iostat -c -d -x -t -m /dev/sda 1 100 >
where /dev/sda is the specific device you want to monitor which is up to you (in this version you need to use a specific device), “1 100” which tells iostat to use “1” second intervals and “100” means to gather 100 data samples (or 100 sceonds in this case).
After running iostat, you then run iostat_plotter_article to create the HTML document with the plots. The command is,
[laytonjb ~]$ iostat_plotter_article.py iostat.out
where “iostat.out” is the output from iostat. The code is written in Python (obviously) and uses the shlex, time, os, and matplotlib modules.
When iostat_plotter_article is done it will create a subdirectory “HTML_REPORT” that contains the plots and an html file “report.html”. Open that html file in a browser or word processor and you will see the plots and a small write-up about them. Feel free to modify the code but please send back changes.
This version of iostat_plotter can be found by going to this page.