DSTAT(1) | DSTAT(1) |
NAME¶
dstat - versatile tool for generating system resource statistics
SYNOPSIS¶
dstat [-afv] [options..] [delay [count]]
DESCRIPTION¶
Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat overcomes some of the limitations and adds some extra features.
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 also cleverly gives you the most detailed information in columns and clearly indicates in what magnitude and unit the output is displayed. Less confusion, less mistakes, more efficient.
Dstat is unique in letting you aggregate block device throughput for a certain diskset or network bandwidth for a group of interfaces, ie. you can see the throughput for all the block devices that make up a single filesystem or storage system.
Dstat allows its data to be directly written to a CSV file to be imported and used by OpenOffice, Gnumeric or Excel to create graphs.
Note
Users of Sleuthkit might find Sleuthkit’s dstat being renamed to datastat to avoid a name conflict. See Debian bug #283709 for more information.
OPTIONS¶
-c, --cpu
-C 0,3,total
-d, --disk
-D total,hda
-g, --page
-i, --int
-I 5,10
-l, --load
-m, --mem
-n, --net
-N eth1,total
-p, --proc
-r, --io
-s, --swap
-S swap1,total
-t, --time
-T, --epoch
-y, --sys
--aio
--cpu-adv
--cpu-use
--fs, --filesystem
--ipc
--lock
--mem-adv
--raw
--socket
--tcp
--udp
--unix
--vm
--vm-adv
--zones
--plugin-name
Possible internal stats are
--list
-a, --all
-f, --full
-v, --vmstat
--bits
--float
--integer
--bw, --blackonwhite
--nocolor
--noheaders
--noupdate
--output file
--profile
PLUGINS¶
While anyone can create their own dstat plugins (and contribute them) dstat ships with a number of plugins already that extend its capabilities greatly. Here is an overview of the plugins dstat ships with:
--battery
--battery-remain
--cpufreq
--dbus
--disk-avgqu
--disk-avgrq
--disk-svctm
--disk-tps
--disk-util
--disk-wait
--dstat
--dstat-cpu
--dstat-ctxt
--dstat-mem
--fan
--freespace
--gpfs
--gpfs-ops
--helloworld
--innodb-buffer
--innodb-io
--innodb-ops
--lustre
--md-status
--memcache-hits
--mysql5-cmds
--mysql5-conn
--mysql5-innodb
--mysql5-io
--mysql5-keys
--mysql-io
--mysql-keys
--net-packets
--nfs3
--nfs3-ops
--nfsd3
--nfsd3-ops
--nfsd4-ops
--nfsstat4
--ntp
--postfix
--power
--proc-count
--qmail
--redis: show redis stats
--rpc
--rpcd
--sendmail
--snmp-cpu
--snmp-load
--snmp-mem
--snmp-net
--snmp-net-err: show network errors using SNMP from DSTAT_SNMPSERVER
--snmp-sys
--snooze
--squid
--test
--thermal
--top-bio
--top-bio-adv
--top-childwait
--top-cpu
--top-cpu-adv
--top-cputime
--top-cputime-avg
--top-int
--top-io
--top-io-adv
--top-latency
--top-latency-avg
--top-mem
--top-oom
--utmp
--vm-cpu
--vm-mem
--vm-mem-adv
--vmk-hba
--vmk-int
--vmk-nic
--vz-cpu
--vz-io
--vz-ubc
--wifi
--zfs-arc
--zfs-l2arc
--zfs-zil
ARGUMENTS¶
delay is the delay in seconds between each update
count is the number of updates to display before exiting
The default delay is 1 and count is unspecified (unlimited)
INTERMEDIATE UPDATES¶
When invoking dstat with a delay greater than 1 and without the --noupdate option, it will show intermediate updates, ie. the first time a 1 sec average, the second update a 2 second average, etc. until the delay has been reached.
So in case you specified a delay of 10, the 9 intermediate updates are NOT snapshots, they are averages over the time that passed since the last final update. The end result is that you get a 10 second average on a new line, just like with vmstat.
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 impact of dstat:
dstat -taf --debug
Using the time plugin together with cpu, net, disk, system, load, proc and top_cpu plugins:
dstat -tcndylp --top-cpu
this is identical to
dstat --time --cpu --net --disk --sys --load --proc --top-cpu
Using dstat to relate advanced cpu stats with interrupts per device:
dstat -t --cpu-adv -yif
BUGS¶
Since it is practically impossible to test dstat on every possible permutation of kernel, python or distribution version, I need your help and your feedback to fix the remaining problems. If you have improvements or bugreports, please send them to: dag@wieers.com[1]
Note
Please see the TODO file for known bugs and future plans.
FILES¶
Paths that may contain external dstat_*.py plugins:
~/.dstat/ (path of binary)/plugins/ /usr/share/dstat/ /usr/local/share/dstat/
ENVIRONMENT VARIABLES¶
Dstat will read additional command line arguments from the environment variable DSTAT_OPTS. You can use this to configure Dstat’s default behavior, e.g. if you have a black-on-white terminal:
export DSTAT_OPTS="--bw --noupdate"
Other internal or external plugins have their own environment variables to influence their behavior, e.g.
DSTAT_NTPSERVER
DSTAT_MYSQL DSTAT_MYSQL_HOST DSTAT_MYSQL_PORT DSTAT_MYSQL_SOCKET DSTAT_MYSQL_USER DSTAT_MYSQL_PWD
DSTAT_SNMPSERVER DSTAT_SNMPCOMMUNITY
DSTAT_SQUID_OPTS
DSTAT_TIMEFMT
SEE ALSO¶
Performance tools¶
htop(1), ifstat(1), iftop(8), iostat(1), mpstat(1), netstat(8), nfsstat(8), perf(1), powertop(1), rtacct(8), top(1), vmstat(8), xosview(1)
Process tracing¶
Binary debugging¶
Memory usage tools¶
free(1), memusage, memusagestat, ps_mem(1), slabtop(1), smem(8)
Accounting tools¶
Hardware debugging tools¶
dmidecode(8), ifinfo(1), lsdev(1), lshal(1), lshw(1), lsmod(8), lspci(8), lsusb(8), numactl(8), smartctl(8), turbostat(8), x86info(1)
Application debugging¶
Xorg related tools¶
Other useful info¶
AUTHOR¶
Written by Dag Wieers dag@wieers.com[1]
Homepage at http://dag.wieers.com/home-made/dstat/
This manpage was initially written by Andrew Pollock apollock@debian.org[2] for the Debian GNU/Linux system.
AUTHOR¶
Dag Wieers <dag@wieers.com>
NOTES¶
- 1.
- dag@wieers.com
- 2.
- apollock@debian.org
August 2014 | 0.7.3 |