1DSTAT(1) DSTAT(1)
2
3
4
6 dstat - versatile tool for generating system resource statistics
7
9 dstat [-afv] [options..] [delay [count]]
10
11
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
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 enable filesystem stats (open files, inodes)
99
100 --ipc enable ipc stats (message queue, semaphores, shared memory)
101
102 --lock enable file lock stats (posix, flock, read, write)
103
104 --raw enable raw stats (raw sockets)
105
106 --socket
107 enable socket stats (total, tcp, udp, raw, ip-fragments)
108
109 --tcp enable tcp stats (listen, established, syn, time_wait, close)
110
111 --udp enable udp stats (listen, active)
112
113 --unix enable unix stats (datagram, stream, listen, active)
114
115 --vm enable vm stats (hard pagefaults, soft pagefaults, allocated,
116 free)
117
118 --plugin-name
119 enable (external) plugins by plugin name, see PLUGINS for
120 options
121
122 Possible internal stats are
123 aio, cpu, cpu24, disk, disk24, disk24old, epoch, fs, int, int24,
124 io, ipc, load, lock, mem, net, page, page24, proc, raw, socket,
125 swap, swapold, sys, tcp, time, udp, unix, vm
126
127 --list list the internal and external plugin names
128
129 -a, --all
130 equals -cdngy (default)
131
132 -f, --full
133 expand -C, -D, -I, -N and -S discovery lists
134
135 -v, --vmstat
136 equals -pmgdsc -D total
137
138 --float
139 force float values on screen (mutual exclusive with --integer)
140
141 --integer
142 force integer values on screen (mutual exclusive with --float)
143
144 --bw, --blackonwhite
145 change colors for white background terminal
146
147 --nocolor
148 disable colors (implies --noupdate)
149
150 --noheaders
151 disable repetitive headers
152
153 --noupdate
154 disable intermediate updates when delay > 1
155
156 --output file
157 write CSV output to file
158
159 --profile
160 show profiling statistics when exiting dstat
161
163 While anyone can create their own dstat plugins (and contribute them)
164 dstat ships with a number of plugins already that extend its
165 capabilities greatly. Here is an overview of the plugins dstat ships
166 with:
167
168
169 --battery
170 battery in percentage (needs ACPI)
171
172 --battery-remain
173 battery remaining in hours, minutes (needs ACPI)
174
175 --cpufreq
176 CPU frequency in percentage (needs ACPI)
177
178 --dbus number of dbus connections (needs python-dbus)
179
180 --disk-tps
181 per disk transactions per second (tps) stats
182
183 --disk-util
184 per disk utilization in percentage
185
186 --dstat
187 show dstat cputime consumption and latency
188
189 --dstat-cpu
190 show dstat advanced cpu usage
191
192 --dstat-ctxt
193 show dstat context switches
194
195 --dstat-mem
196 show dstat advanced memory usage
197
198 --fan fan speed (needs ACPI)
199
200 --freespace
201 per filesystem disk usage
202
203 --gpfs GPFS read/write I/O (needs mmpmon)
204
205 --gpfs-ops
206 GPFS filesystem operations (needs mmpmon)
207
208 --helloworld
209 Hello world example dstat plugin
210
211 --innodb-buffer
212 show innodb buffer stats
213
214 --innodb-io
215 show innodb I/O stats
216
217 --innodb-ops
218 show innodb operations counters
219
220 --lustre
221 show lustre I/O throughput
222
223 --memcache-hits
224 show the number of hits and misses from memcache
225
226 --mysql5-cmds
227 show the MySQL5 command stats
228
229 --mysql5-conn
230 show the MySQL5 connection stats
231
232 --mysql5-io
233 show the MySQL5 I/O stats
234
235 --mysql5-keys
236 show the MySQL5 keys stats
237
238 --mysql-io
239 show the MySQL I/O stats
240
241 --mysql-keys
242 show the MySQL keys stats
243
244 --net-packets
245 show the number of packets received and transmitted
246
247 --nfs3 show NFS v3 client operations
248
249 --nfs3-ops
250 show extended NFS v3 client operations
251
252 --nfsd3
253 show NFS v3 server operations
254
255 --nfsd3-ops
256 show extended NFS v3 server operations
257
258 --ntp show NTP time from an NTP server
259
260 --postfix
261 show postfix queue sizes (needs postfix)
262
263 --power
264 show power usage
265
266 --proc-count
267 show total number of processes
268
269 --qmail
270 show qmail queue sizes (needs qmail)
271
272 --rpc show RPC client calls stats
273
274 --rpcd show RPC server calls stats
275
276 --sendmail
277 show sendmail queue size (needs sendmail)
278
279 --snooze
280 show number of ticks per second
281
282 --squid
283 show squid usage statistics
284
285 --test show test plugin output
286
287 --thermal
288 system temperature sensors
289
290 --top-bio
291 show most expensive block I/O process
292
293 --top-bio-adv
294 show most expensive block I/O process (incl. pid and other
295 stats)
296
297 --top-childwait
298 show process waiting for child the most
299
300 --top-cpu
301 show most expensive CPU process
302
303 --top-cpu-adv
304 show most expensive CPU process (incl. pid and other stats)
305
306 --top-cputime
307 show process using the most CPU time (in ms)
308
309 --top-cputime-avg
310 show process with the highest average timeslice (in ms)
311
312 --top-int
313 show most frequent interrupt
314
315 --top-io
316 show most expensive I/O process
317
318 --top-io-adv
319 show most expensive I/O process (incl. pid and other stats)
320
321 --top-latency
322 show process with highest total latency (in ms)
323
324 --top-latency-avg
325 show process with the highest average latency (in ms)
326
327 --top-mem
328 show process using the most memory
329
330 --top-oom
331 show process that will be killed by OOM the first
332
333 --utmp show number of utmp connections (needs python-utmp)
334
335 --vmk-hba
336 show VMware ESX kernel vmhba stats
337
338 --vmk-int
339 show VMware ESX kernel interrupt stats
340
341 --vmk-nic
342 show VMware ESX kernel port stats
343
344 --vm-memctl
345 show ballooning status inside VMware guests
346
347 --vz-cpu
348 show CPU usage per OpenVZ guest
349
350 --vz-io
351 show I/O usage per OpenVZ guest
352
353 --vz-ubc
354 show OpenVZ user beancounters
355
356 --wifi wireless link quality and signal to noise ratio
357
359 delay is the delay in seconds between each update
360
361 count is the number of updates to display before exiting
362
363 The default delay is 1 and count is unspecified (unlimited)
364
365
367 When invoking dstat with a delay greater than 1 and without the
368 --noupdate option, it will show intermediate updates, ie. the first
369 time a 1 sec average, the second update a 2 second average, etc. until
370 the delay has been reached.
371
372 So in case you specified a delay of 10, the 9 intermediate updates are
373 NOT snapshots, they are averages over the time that passed since the
374 last final update. The end result is that you get a 10 second average
375 on a new line, just like with vmstat.
376
377
379 Using dstat to relate disk-throughput with network-usage (eth0), total
380 CPU-usage and system counters:
381
382
383 dstat -dnyc -N eth0 -C total -f 5
384 Checking dstat’s behaviour and the system impact of dstat:
385
386
387 dstat -taf --debug
388 Using the time plugin together with cpu, net, disk, system, load, proc
389 and top_cpu plugins:
390
391
392 dstat -tcndylp --top-cpu
393 this is identical to
394
395
396 dstat --time --cpu --net --disk --sys --load --proc --top-cpu
397 Using dstat to relate cpu stats with interrupts per device:
398
399
400 dstat -tcyif
401
403 Since it is practically impossible to test dstat on every possible
404 permutation of kernel, python or distribution version, I need your help
405 and your feedback to fix the remaining problems. If you have
406 improvements or bugreports, please send them to: [1]dag@wieers.com
407
408
409 Note
410 Please see the TODO file for known bugs and future plans.
411
412
414 Paths that may contain external dstat_*.py plugins:
415
416
417 ~/.dstat/
418 (path of binary)/plugins/
419 /usr/share/dstat/
420 /usr/local/share/dstat/
421
423 Performance tools
424 ifstat(1), iftop(8), iostat(1), mpstat(1), netstat(1), nfsstat(1), nstat, vmstat(1), xosview(1)
425
426 Debugging tools
427 htop(1), lslk(1), lsof(8), top(1)
428
429 Process tracing
430 ltrace(1), pmap(1), ps(1), pstack(1), strace(1)
431
432 Binary debugging
433 ldd(1), file(1), nm(1), objdump(1), readelf(1)
434
435 Memory usage tools
436 free(1), memusage, memusagestat, slabtop(1)
437
438 Accounting tools
439 dump-acct, dump-utmp, sa(8)
440
441 Hardware debugging tools
442 dmidecode, ifinfo(1), lsdev(1), lshal(1), lshw(1), lsmod(8), lspci(8), lsusb(8), smartctl(8), x86info(1)
443
444 Application debugging
445 mailstats(8), qshape(1)
446
447 Xorg related tools
448 xdpyinfo(1), xrestop(1)
449
450 Other useful info
451 collectl(1), proc(5), procinfo(8)
452
454 Written by Dag Wieers [1]dag@wieers.com
455
456 Homepage at [2]http://dag.wieers.com/home-made/dstat/
457
458 This manpage was initially written by Andrew Pollock
459 [3]apollock@debian.org for the Debian GNU/Linux system.
460
461
463 1. dag@wieers.com
464 mailto:dag@wieers.com
465
466 2. http://dag.wieers.com/home-made/dstat/
467 http://dag.wieers.com/home-made/dstat/
468
469 3. apollock@debian.org
470 mailto:apollock@debian.org
471
472
473
474 0.7.0 06/15/2010 DSTAT(1)