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
Dimitris
February 22, 2016 — 10:21 pm
This is amazing!!! Thank you very much for sharing it.
I’d like to ask you about the drag&drop functionality. I tried to drop another csv file but it looks that cannot display the according graphs. Also, I cloned your repository and tried to connect it with a specific csv file without the initial drag&drop but couldn’t figure it out. Any help it would be really appreciated.
Thank you very much again for this superb tool.
Dabz
February 23, 2016 — 10:32 pm
Thanks for your feedback 😉
I’d like to ask you about the drag&drop functionality. I tried to drop another csv file but it looks that cannot display the according graphs
Does the first CSV contains a time column (dstat -t)? If the first file contains a time column, the X axis used will be its time window, thus if you drop a second CSV that doesn’t have the same time window or has been recorded without the time, you will not be able to see it. I guess that’s what happens… or it’s a bug :p
You can try to remove the time column in both CSV and check if you still have the same issue. (If there is no time column, a sequential axis is used)
I cloned your repository and tried to connect it with a specific csv file without the initial drag&drop but couldn’t figure it out. Any help it would be really appreciated.
Actually, it’s a good use case, it would make the results easier to share. I did a small script to create a standalone HTML page from one or more CSV, I pushed it to the repo.
You can create an HTML file by executing the command: generate_page.sh file1.csv file2.csv > test.html. I let you try and see if it suits you 😉
John
April 26, 2016 — 1:41 pm
I found a work around for this issue. dstat writes the column header “date/time” in the csv file.
If you change that to “time” the x-axis will plot the time series.
Murali Thangavel
March 14, 2018 — 1:12 pm
Instead of Sunday graph showing Wednesday. Anyone facing similar issue?
Thanks.
Dabz
March 14, 2018 — 3:31 pm
This could be an issue with your dstat output not matching the graph expectation. If the time is available (dstat … -t …), it’s being parsed with the following format: ‘%Hh %Mm %Ss’ (https://github.com/Dabz/dstat_graph/blob/master/js/dashboard.js#L181). Could you maybe upload the file generating this issue? I can have a quick look 😉
Tony Reina
May 16, 2018 — 12:20 am
This is an awesome tool. Is there a way to just plot individual cpu cores rather than the global average?
Dabz
May 24, 2018 — 2:31 pm
Oops, sorry, I forgot about your message. You can plot individual CPU using dstat with the following command “dstat -C 0,1,2,…n”. Although that it will be rendered as graph, the output should be slightly different from the total one (for the simple reasons that there is no rules configured for single CPU: https://github.com/Dabz/dstat_graph/blob/master/js/graph.js#L27)
Suresh
April 25, 2019 — 10:35 am
is this URL http://lamada.eu/dstat-graph/ still working?
When I did dragDrop dstat output csv file, it was just a white page. 🙁
My dstat command was:
dstat -tcmdno .csv 1 900