Use dstat on command line for quick system resource stat collection

https://mypoorbraindump.wordpress.com/2014/02/04/use-dstat-on-command-line-for-quick-system-resource-stat-collection/


 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.