Saturday, September 15, 2007

DStat - resource statistics linux tool

DStat is a versatile replacement for vmstat, iostat, netstat and ifstat. Dstat overcomes some of their limitations and adds some extra features, more counters and flexibility. Dstat is handy for monitoring systems during performance tuning tests, benchmarks or troubleshooting.

Dstat allows you to view all of your system resources instantly, you can eg. compare disk usage in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).

Dstat gives you detailed selective information in columns and clearly indicates in what magnitude and unit the output is displayed. Less confusion, less mistakes.

DStat features lifted from site based from

* Combines vmstat, iostat, ifstat, netstat information and more
* Shows stats in exactly the same timeframe
* Enable/order counters as they make most sense during analysis/troubleshooting
* Modular design
* Written in python so easily extendable for the task at hand
* Easy to extend, add your own counters (please contribute those)
* Includes about 10 external plugins to show how easy it is to add counters
* Can summarize grouped block/network devices and give total numbers
* Can show interrupts per device
* Very accurate timeframes, no timeshifts when system is stressed
* Shows exact units and limits conversion mistakes
* Indicate different units with different colors
* Show intermediate results when delay > 1
* Allows to export CSV output, which can be imported in Gnumeric and Excel to make graphs


As with any other linux tool from Fedora, DStat can be easily installed using yum like so

# yum -y install dstat


# dstat -t -fa

My DStat screenshot in action:

Additionally, since Dstat supports generating stats directed to an output file, this logically means that DStat can be more useful when combined and launched within crontab utility.

Launching Dstat from crontab job provides another way on setting a new task for gathering top N resource statistics dumped by DStats to a file. Thus, we can generate report and long term statistical data from it done on chosen regular monthly or weekly basis, which can then be feed to MRTG config file for further server resource data graph.

Using DStat when properly used, enhances our server I/O capacity, load and server resource planning to scrutinize and analyze which point of time, time of the day, day of the week, and/or day of the month usually our linux box becomes more and/or less busy in terms of this resource statistical values dumped by DStats from regular point of interval time via cronjob.


Linux monitoring tools comes in many variety shapes and features, they are all created for specific task, just waiting for us to make use of it.


Might be interested kicking black boxes, thanks Joe.


Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy