dstat - a window to your system
When it comes to Unix diagnostics I was raised the old fashion way, with iostat, vmstat and similar tools. However times change and tools evolve. dstat, while not as comprehensive as using all the tools one by one, provides a wide range of system performance details in an easy to use package.
While it’s useful enough in its default state there is even more
functionality lurking just below the surface. To see which other modules
are available (but are not enabled by default) run
dstat -M list. To add an extra module to the output use a command like
dstat -a -M topmem -M topcpu
As part of my growing use of the tool I’ve started to write my own little dstat plugins. I was pleasantly surprised at how easy they were to write and deploy even with my basic python skills. While the memcached plugin was a proof of concept I’ve not needed much I’ve found the process count plugin to be very handy.
dstat is becoming one of the overview tools I use when investigating performance issues and it’s worthy of a place in your toolbox too.