Dstat is a replacement for the vmstat, iostat, netstat and ifstat utility that overcomes some limitations by adding extra features. Dstat is one of the most powerful and flexible utilities for generating and monitoring Linux resource statistics. You can easily view your system resources instantly using dstat. You can also export dstat's data to aCSV file to be imported and used by OpenOffice.
In this tutorial, we will learn how to install and use dstat on Ubuntu-16.04.
A server runing Ubuntu-16.04.
Dstat comes in the Ubuntu-16.04 repository by default, you can easily install it by running the following command:
sudo apt-get install dstat
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 782 not upgraded.
Need to get 68.2 kB of archives.
After this operation, 351 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu/ trusty/universe dstat all 0.7.2-3build1 [68.2 kB]
Fetched 68.2 kB in 3s (18.4 kB/s)
Selecting previously unselected package dstat.
(Reading database ... 271096 files and directories currently installed.)
Preparing to unpack .../dstat_0.7.2-3build1_all.deb ...
Unpacking dstat (0.7.2-3build1) ...
Processing triggers for man-db (188.8.131.52-1) ...
Setting up dstat (0.7.2-3build1) ...
Getting Started with Dstat
Once dstat is installed, it's time to monitor your systems performance stats.
Let's start with the following command:
Dstat provides some advanced commands that can be used in production environment. For example, if you want to monitor a single application that is using the most CPU and consuming the most amount of memory, run the following command:
There are lots of useful options available with dstat, you can list out all available options with the following command:
Usage: dstat [-afv] [options..] [delay [count]]
Versatile tool for generating system resource statistics
-c, --cpu enable cpu stats
-C 0,3,total include cpu0, cpu3 and total
-d, --disk enable disk stats
-D total,hda include hda and total
-g, --page enable page stats
-i, --int enable interrupt stats
-I 5,eth2 include int5 and interrupt used by eth2
-l, --load enable load stats
-m, --mem enable memory stats
-n, --net enable network stats
-N eth1,total include eth1 and total
-p, --proc enable process stats
-r, --io enable io stats (I/O requests completed)
-s, --swap enable swap stats
-S swap1,total include swap1 and total
-t, --time enable time/date output
-T, --epoch enable time counter (seconds since epoch)
-y, --sys enable system stats
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...
You may sometimes need to manually adjust the PHP settings on your cPanel server – for example if a site is hitting the PHP memory, or file size upload limit. WHM allows you to quickly change the settings of any PHP version installed on the server when needed, using the...