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 (22.214.171.124-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
Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will...
Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you...