Journal of an errant developer

Generating graphs from dstat CSV output

I really like dstat for my day to day performance monitoring & analysis tasks. This is an awesome tools to understand how your system behave and to identify potential bottleneck. After writing a few plugins for MongoDB, I wanted to have a more ‘graphical’ way to interpret the results.

Looking on the tremendous wild net, I found a few interesting projects like: dstat2graphs or gnuplot. Nonetheless none seems to completely fulfils my requirements which are:

  • Can compare & aggregate multiple dstat outputs. Quite useful when you are working in a multi-tenant architecture (e.g. a MongoDB sharded cluster)
  • Need to be able to import data into Excel, this might looks stupid but that is quite useful when you need to do presentations
  • Works properly with all dstat plugins

Thus I decided to write my own graphing tool a while ago. I have been using it for quite sometime now, maybe it could also be useful to you, I thought it might save you a lot of time during your performance tuning exercices 🙂
This tool is available at: http://lamada.eu/dstat-graph/ and the sources are available on: https://github.com/Dabz/dstat_graph.

Entirely developed using Javascript and D3.js, it requires an Internet Browser and allow you to quickly graph dstat outputs. To use it, open the page in your browser and drag&drop dstat CSV output that you want to graph.

Some additional information:

  • If the time has been recorded (dstat -t), it will be used for the X axis, a sequential axis will be used otherwise.
  • dstat –mem seems to be corrupting CSV output, do not use it with dstat –output xxx.csv
  • If you want to compare multiple files, you need to drag&drop them one by one, a nasty bug can happens if you are dropping multiple files at the same time :/
  • the focus windows at the top can be used to target a specific part of the graphes and is by default the CPU idle times

« »

© 2019 Journal of an errant developer. Theme by Anders Norén.