While the iotop data is not actually part of the statistics gathered automatically by the sysstat package, we can log the data for posterity anyway. Follow these steps as a root-level user to log the iostat data:
- Create a file named iotop at /etc/cron.d/ and fill it with this line:
* * * * * root iotop -boat -qqq -d 5 -n 2 >> /var/log/iotop
- Reload the configuration files of the cron service with this command:
sudo service cron reload
By adding the -a parameter, iotop will log the cumulative total of the I/O used between the readings, instead of the I/O per second. We use the -d argument to add a 5 second delay between two readings, as specified by the -n parameter. Together, this means that we get a 5 second sample ...