Advanced dstat

dstat is a versatile tool for generating system resource statistics.

I'm using dstat everyday to quickly find processes that are stressing our systems. Sometimes it's just a "zombie process" that utilizes 100% of all available CPU cores, sometimes there are serious problems you can quickly identify.

First you need to install the dstat tool (I'm assuming you're running debian or ubuntu):

$ sudo apt-get install dstat

The default output of dstat looks like this:

This is not very useful, albeit very easy to type.

When you want to see more details you need to give it some parameters:

-c, --cpu
 enable cpu stats (system, user, idle, wait,
 hardware interrupt, software interrupt)
-t, --time
 enable time/date output
 show most expensive I/O process (incl. pid and other stats)/qq
 show most expensive block I/O process (incl. pid and other stats)
 per disk utilization in percentage
 per disk transactions per second (tps) stats
 show most expensive CPU process (incl. pid and other stats)

Put all these parameters together and make an alias, and you will get a very useful dstat output.

$ alias dstat='dstat -tc --top-io-adv --top-bio-adv --disk-util --disk-tps --top-cpu-adv'



No public comments, but you can email comments@hadooppowered.com or tweet @hadooppowered.

← Older
Newer →