Linux Performance Monitoring with dstat
dstat

I use this tool more than any other performance monitoring tool I’ve come across. It’s great for looking at overall network input and output, individual disks, and memory usage.

It’s probably pretty insignificant, but I really like that the header repeats after awhile so you can easily keep track of the columns. Sometimes it’s the little things that make all the difference.
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 in real-time, you can eg. compare disk utilization in combination with interrupts from your IDE controller, or compare the network bandwidth numbers directly with the disk throughput (in the same interval).
Here’s an example of dstat output while writing out some data on sdb.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
# dstat -D sdb ----total-cpu-usage---- --dsk/sdb-- -net/total- ---paging-- ---system-- usr sys idl wai hiq siq| read writ| recv send| in out | int csw 1 7 92 0 0 0| 462k 605k| 0 0 | 372B 506B|7796 12k 2 10 84 3 0 0|4096B 77M|1459B 2674B| 0 0 | 16k 4384 4 10 82 4 0 0| 52k 70M|4269B 5119B| 0 0 | 22k 4328 1 10 86 3 0 0| 44k 70M|2125B 2888B| 0 0 | 13k 3636 4 9 83 4 0 0| 152k 73M|9884B 15k| 0 0 | 16k 5032 1 11 85 3 0 0| 20k 68M| 894B 1505B| 704k 0 | 13k 5254 4 11 83 3 0 0| 0 65M| 16k 28k| 728k 0 | 25k 5351 1 10 85 3 0 0|4096B 79M| 11k 12k| 800k 0 | 14k 4661 3 11 82 3 0 0| 268k 73M| 39k 48k| 320k 0 | 23k 12k 2 12 83 3 0 0|4096B 67M|6220B 12k| 0 0 | 16k 4585 3 11 83 3 0 0| 0 68M| 28k 33k| 0 0 | 18k 4362 3 10 83 3 0 0|4096B 79M|1098B 2006B| 0 128k| 19k 4517 |
This handy little app replaces common uses of netstat and iostat. You can tell it to monitor individual block devices, cpu’s, memory, swap usage, etc. If dstat isn’t available in your Linux distribution’s repositories add the maintainer’s repository, which just happens to be the