1DSTAT(1)                                                              DSTAT(1)
2
3
4

NAME

6       dstat - versatile tool for generating system resource statistics
7

SYNOPSIS

9       dstat [-afv] [options..] [delay [count]]
10
11

DESCRIPTION

13       Dstat is a versatile replacement for vmstat, iostat and ifstat. Dstat
14       overcomes some of the limitations and adds some extra features.
15
16       Dstat allows you to view all of your system resources instantly, you
17       can eg. compare disk usage in combination with interrupts from your IDE
18       controller, or compare the network bandwidth numbers directly with the
19       disk throughput (in the same interval).
20
21       Dstat also cleverly gives you the most detailed information in columns
22       and clearly indicates in what magnitude and unit the output is
23       displayed. Less confusion, less mistakes, more efficient.
24
25       Dstat is unique in letting you aggregate block device throughput for a
26       certain diskset or network bandwidth for a group of interfaces, ie. you
27       can see the throughput for all the block devices that make up a single
28       filesystem or storage system.
29
30       Dstat allows its data to be directly written to a CSV file to be
31       imported and used by OpenOffice, Gnumeric or Excel to create graphs.
32
33
34       Note
35       Users of Sleuthkit might find Sleuthkit’s dstat being renamed to
36       datastat to avoid a name conflict. See Debian bug #283709 for more
37       information.
38
39

OPTIONS

41       -c, --cpu
42              enable cpu stats (system, user, idle, wait, hardware interrupt,
43              software interrupt)
44
45       -C 0,3,total
46              include cpu0, cpu3 and total (when using -c/--cpu)
47
48       -d, --disk
49              enable disk stats (read, write)
50
51       -D total,hda
52              include total and hda (when using -d/--disk)
53
54       -g, --page
55              enable page stats (page in, page out)
56
57       -i, --int
58              enable interrupt stats
59
60       -I 5,10
61              include interrupt 5 and 10 (when using -i/--int)
62
63       -l, --load
64              enable load average stats (1 min, 5 mins, 15mins)
65
66       -m, --mem
67              enable memory stats (used, buffers, cache, free)
68
69       -n, --net
70              enable network stats (receive, send)
71
72       -N eth1,total
73              include eth1 and total (when using -n/--net)
74
75       -p, --proc
76              enable process stats (runnable, uninterruptible, new)
77
78       -r, --io
79              enable I/O request stats (read, write requests)
80
81       -s, --swap
82              enable swap stats (used, free)
83
84       -S swap1,total
85              include swap1 and total (when using -s/--swap)
86
87       -t, --time
88              enable time/date output
89
90       -T, --epoch
91              enable time counter (seconds since epoch)
92
93       -y, --sys
94              enable system stats (interrupts, context switches)
95
96       --aio  enable aio stats (asynchronous I/O)
97
98       --fs, --filesystem
99              enable filesystem stats (open files, inodes)
100
101       --ipc  enable ipc stats (message queue, semaphores, shared memory)
102
103       --lock enable file lock stats (posix, flock, read, write)
104
105       --raw  enable raw stats (raw sockets)
106
107       --socket
108              enable socket stats (total, tcp, udp, raw, ip-fragments)
109
110       --tcp  enable tcp stats (listen, established, syn, time_wait, close)
111
112       --udp  enable udp stats (listen, active)
113
114       --unix enable unix stats (datagram, stream, listen, active)
115
116       --vm   enable vm stats (hard pagefaults, soft pagefaults, allocated,
117              free)
118
119       --plugin-name
120              enable (external) plugins by plugin name, see PLUGINS for
121              options
122
123       Possible internal stats are
124              aio, cpu, cpu24, disk, disk24, disk24old, epoch, fs, int, int24,
125              io, ipc, load, lock, mem, net, page, page24, proc, raw, socket,
126              swap, swapold, sys, tcp, time, udp, unix, vm
127
128       --list list the internal and external plugin names
129
130       -a, --all
131              equals -cdngy (default)
132
133       -f, --full
134              expand -C, -D, -I, -N and -S discovery lists
135
136       -v, --vmstat
137              equals -pmgdsc -D total
138
139       --bits force bits for values expressed in bytes
140
141       --float
142              force float values on screen (mutual exclusive with --integer)
143
144       --integer
145              force integer values on screen (mutual exclusive with --float)
146
147       --bw, --blackonwhite
148              change colors for white background terminal
149
150       --nocolor
151              disable colors (implies --noupdate)
152
153       --noheaders
154              disable repetitive headers
155
156       --noupdate
157              disable intermediate updates when delay > 1
158
159       --output file
160              write CSV output to file
161
162       --profile
163              show profiling statistics when exiting dstat
164

PLUGINS

166       While anyone can create their own dstat plugins (and contribute them)
167       dstat ships with a number of plugins already that extend its
168       capabilities greatly. Here is an overview of the plugins dstat ships
169       with:
170
171
172       --battery
173              battery in percentage (needs ACPI)
174
175       --battery-remain
176              battery remaining in hours, minutes (needs ACPI)
177
178       --cpufreq
179              CPU frequency in percentage (needs ACPI)
180
181       --dbus number of dbus connections (needs python-dbus)
182
183       --disk-tps
184              per disk transactions per second (tps) stats
185
186       --disk-util
187              per disk utilization in percentage
188
189       --dstat
190              show dstat cputime consumption and latency
191
192       --dstat-cpu
193              show dstat advanced cpu usage
194
195       --dstat-ctxt
196              show dstat context switches
197
198       --dstat-mem
199              show dstat advanced memory usage
200
201       --fan  fan speed (needs ACPI)
202
203       --freespace
204              per filesystem disk usage
205
206       --gpfs GPFS read/write I/O (needs mmpmon)
207
208       --gpfs-ops
209              GPFS filesystem operations (needs mmpmon)
210
211       --helloworld
212              Hello world example dstat plugin
213
214       --innodb-buffer
215              show innodb buffer stats
216
217       --innodb-io
218              show innodb I/O stats
219
220       --innodb-ops
221              show innodb operations counters
222
223       --lustre
224              show lustre I/O throughput
225
226       --memcache-hits
227              show the number of hits and misses from memcache
228
229       --mysql5-cmds
230              show the MySQL5 command stats
231
232       --mysql5-conn
233              show the MySQL5 connection stats
234
235       --mysql5-io
236              show the MySQL5 I/O stats
237
238       --mysql5-keys
239              show the MySQL5 keys stats
240
241       --mysql-io
242              show the MySQL I/O stats
243
244       --mysql-keys
245              show the MySQL keys stats
246
247       --net-packets
248              show the number of packets received and transmitted
249
250       --nfs3 show NFS v3 client operations
251
252       --nfs3-ops
253              show extended NFS v3 client operations
254
255       --nfsd3
256              show NFS v3 server operations
257
258       --nfsd3-ops
259              show extended NFS v3 server operations
260
261       --ntp  show NTP time from an NTP server
262
263       --postfix
264              show postfix queue sizes (needs postfix)
265
266       --power
267              show power usage
268
269       --proc-count
270              show total number of processes
271
272       --qmail
273              show qmail queue sizes (needs qmail)
274
275       --rpc  show RPC client calls stats
276
277       --rpcd show RPC server calls stats
278
279       --sendmail
280              show sendmail queue size (needs sendmail)
281
282       --snooze
283              show number of ticks per second
284
285       --squid
286              show squid usage statistics
287
288       --test show test plugin output
289
290       --thermal
291              system temperature sensors
292
293       --top-bio
294              show most expensive block I/O process
295
296       --top-bio-adv
297              show most expensive block I/O process (incl. pid and other
298              stats)
299
300       --top-childwait
301              show process waiting for child the most
302
303       --top-cpu
304              show most expensive CPU process
305
306       --top-cpu-adv
307              show most expensive CPU process (incl. pid and other stats)
308
309       --top-cputime
310              show process using the most CPU time (in ms)
311
312       --top-cputime-avg
313              show process with the highest average timeslice (in ms)
314
315       --top-int
316              show most frequent interrupt
317
318       --top-io
319              show most expensive I/O process
320
321       --top-io-adv
322              show most expensive I/O process (incl. pid and other stats)
323
324       --top-latency
325              show process with highest total latency (in ms)
326
327       --top-latency-avg
328              show process with the highest average latency (in ms)
329
330       --top-mem
331              show process using the most memory
332
333       --top-oom
334              show process that will be killed by OOM the first
335
336       --utmp show number of utmp connections (needs python-utmp)
337
338       --vmk-hba
339              show VMware ESX kernel vmhba stats
340
341       --vmk-int
342              show VMware ESX kernel interrupt stats
343
344       --vmk-nic
345              show VMware ESX kernel port stats
346
347       --vm-memctl
348              show ballooning status inside VMware guests
349
350       --vz-cpu
351              show CPU usage per OpenVZ guest
352
353       --vz-io
354              show I/O usage per OpenVZ guest
355
356       --vz-ubc
357              show OpenVZ user beancounters
358
359       --wifi wireless link quality and signal to noise ratio
360

ARGUMENTS

362       delay is the delay in seconds between each update
363
364       count is the number of updates to display before exiting
365
366       The default delay is 1 and count is unspecified (unlimited)
367
368

INTERMEDIATE UPDATES

370       When invoking dstat with a delay greater than 1 and without the
371       --noupdate option, it will show intermediate updates, ie. the first
372       time a 1 sec average, the second update a 2 second average, etc. until
373       the delay has been reached.
374
375       So in case you specified a delay of 10, the 9 intermediate updates are
376       NOT snapshots, they are averages over the time that passed since the
377       last final update. The end result is that you get a 10 second average
378       on a new line, just like with vmstat.
379
380

EXAMPLES

382       Using dstat to relate disk-throughput with network-usage (eth0), total
383       CPU-usage and system counters:
384
385
386       dstat -dnyc -N eth0 -C total -f 5
387       Checking dstat’s behaviour and the system impact of dstat:
388
389
390       dstat -taf --debug
391       Using the time plugin together with cpu, net, disk, system, load, proc
392       and top_cpu plugins:
393
394
395       dstat -tcndylp --top-cpu
396       this is identical to
397
398
399       dstat --time --cpu --net --disk --sys --load --proc --top-cpu
400       Using dstat to relate cpu stats with interrupts per device:
401
402
403       dstat -tcyif
404

BUGS

406       Since it is practically impossible to test dstat on every possible
407       permutation of kernel, python or distribution version, I need your help
408       and your feedback to fix the remaining problems. If you have
409       improvements or bugreports, please send them to: [1]dag@wieers.com
410
411
412       Note
413       Please see the TODO file for known bugs and future plans.
414
415

FILES

417       Paths that may contain external dstat_*.py plugins:
418
419
420       ~/.dstat/
421       (path of binary)/plugins/
422       /usr/share/dstat/
423       /usr/local/share/dstat/
424

SEE ALSO

426   Performance tools
427       ifstat(1), iftop(8), iostat(1), mpstat(1), netstat(1), nfsstat(1), nstat, vmstat(1), xosview(1)
428
429   Debugging tools
430       htop(1), lslk(1), lsof(8), top(1)
431
432   Process tracing
433       ltrace(1), pmap(1), ps(1), pstack(1), strace(1)
434
435   Binary debugging
436       ldd(1), file(1), nm(1), objdump(1), readelf(1)
437
438   Memory usage tools
439       free(1), memusage, memusagestat, slabtop(1)
440
441   Accounting tools
442       dump-acct, dump-utmp, sa(8)
443
444   Hardware debugging tools
445       dmidecode, ifinfo(1), lsdev(1), lshal(1), lshw(1), lsmod(8), lspci(8), lsusb(8), smartctl(8), x86info(1)
446
447   Application debugging
448       mailstats(8), qshape(1)
449
450   Xorg related tools
451       xdpyinfo(1), xrestop(1)
452
453   Other useful info
454       collectl(1), proc(5), procinfo(8)
455

AUTHOR

457       Written by Dag Wieers [1]dag@wieers.com
458
459       Homepage at [2]http://dag.wieers.com/home-made/dstat/
460
461       This manpage was initially written by Andrew Pollock
462       [3]apollock@debian.org for the Debian GNU/Linux system.
463
464

REFERENCES

466       1. dag@wieers.com
467          mailto:dag@wieers.com
468
469       2. http://dag.wieers.com/home-made/dstat/
470          http://dag.wieers.com/home-made/dstat/
471
472       3. apollock@debian.org
473          mailto:apollock@debian.org
474
475
476
477  0.7.0                           06/15/2010                          DSTAT(1)
Impressum