dstat -server metrics collection tool

19 Feb

Dstats is a versatile resource statistic tool. This tool combines the ability of iostat, vmstat, netstat, and ifstat. Dstat allow us to monitor the server resources in real-time. When you need to gather those information real-time, dstat will fit your need. 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 [-afv] [options..] [delay [count]]

 

In dstat there are a lot of options, you can see all with the command man dstat, some of the most useful parameters are:

  • -l = shows load statistics
  • -m = shows the memory usage (used, buffer, cache, free)
  • -r = displays I/O statistics,
  • -s = shows the swap usage
  • -t = puts the current time in the first column
  • –fs = displays file system stats (includes amount of files and used inodes)
  • –nocolor = sometimes very useful…
  • –socket = shows interesting network statistics
  • –tcp = displays common TCP stats
  • –udp = shows you the listen and active figures for the UDP usage

Sample :

dstat -tcmsn -N eth0  60

every 60 seconds it will collect metrics

You can redirect it to csv as well

dstat -c -n -N eth0,lo -m -s -d –output dstat.csv

dstat

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: