https://mypoorbraindump.wordpress.com/2014/02/04/use-dstat-on-command-line-for-quick-system-resource-stat-collection/
Posted: February 4, 2014 Filed under: Linux Leave a comment
dstat -tv --output /tmp/${HOSTNAME}-dstat-$(date +"%Y%m%d-%H%M%S").csv 10
Starts a dstat process at 10 second intervals and writes output to /tmp called <hostname>-dstat-yyyymmdd-hhmmss.csv &
Kill it with
kill `ps -ef | grep dstat | grep -v grep | awk '{print $2}'`
This csv file is easy to open in a Excel to chart performance metrics. Consider adding to a script for automation.