Dstat – Versatile resource statistics tool

Sponsored Link
Dstat is a versatile replacement for vmstat, iostat, netstat, nfsstat 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 Features

* 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

Dstat External plugins

Here are the existing plugins

* dstat_app -- the most expensive process on the system
* dstat_battery -- the percentage of battery charge (needs ACPI)
* dstat_cpufreq -- the CPU frequency (needs ACPI)
* dstat_dbus -- the number of dbus connections (needs python-dbus)
* dstat_freespace -- see the disk usage per partition
* dstat_gpfs -- the GPFS read/write IO
* dstat_gpfsop -- the GPFS filesystem operations
* dstat_nfs3 -- the NFS v3 client operations
* dstat_nfs3op -- the extended NFS v3 client operations
* dstat_nfsd3 -- the NFS v3 server operations
* dstat_nfsd3op -- the extended NFS v3 server operations
* dstat_postfix -- counters of the differnt queues (needs postfix)
* dstat_rpc -- RPC client calls
* dstat_rpcd -- RPC server calls
* dstat_sendmail -- counters of the queue (needs sendmail)
* dstat_thermal -- CPU temperature
* dstat_utmp -- number of utmp sessions (needs python-utmp)
* dstat_wifi -- wireless link quality and signal/noise ratio (needs python-wifi)

Install Dstat in Ubuntu

sudo aptitude install dstat

This will complete the installation.

dstat Syntax

dstat [-afv] [-cdgilmnpsty] [-D..] [-I..] [-N..] [delay [count]]

If you want to use dstat just use the following command


Output looks similar to the following screen

Dstat Examples

Using dstat to relate disk-throughput with network-usage (eth0), total CPU-usage and system counters:

dstat -dnyc -N eth0 -C total -f 5

Checking dstat's behaviour and the system's impact on dstat:

dstat -taf --debug

Using the time plugin together with cpu, net, disk, system, load, proc and topcpu plugins:

dstat -tcndylp -M topcpu

this is identical to

dstat -M time,cpu,net,disk,sys,load,proc,topcpu

Using dstat to relate cpu stats with interrupts per device:

dstat -tcyif

Sponsored Link

You may also like...

1 Response

  1. Quest says:

    How can I use dstat to receive information every 100ms instead of every second.

    “dstat 1” works, but “dstat 0.1” doesn’t work.

    What can I use instead of it ?

Leave a Reply

Your email address will not be published. Required fields are marked *