How to Monitor Processor, Memory, Network Performance using dstat in Linux?
Last Updated :
28 Mar, 2021
Do you want to run a quick performance test on your Linux machine? You may want to check the dstat command. Dstat is a versatile and efficient command that combines the features of several older tools such as vmstat, netstat, iostat, and ifstat to provide useful insights into Linux system performance.
You can analyze virtual memory, network connections and interfaces, CPU operation, input/output devices, and more with just one command. We'll look at some dstat commands and see what they can teach you about your systems in today's article.
Dstat Features
- It shows the information on the complete package from vmstat, iostat, ifstat, netstat, and other sources.
- During analysis/troubleshooting, enable/order counters as they make the most sense.
- Add your own counters to make it more versatile (please contribute those)
- Many external plugins are included to illustrate how simple it is to add counters.
- Can total the numbers from a group of block/network devices.
- When the device is overloaded, the timeframes are extremely precise, and there are no timeshifts.
Installation:
On most Linux distributions, you can install dstat from the default repositories.
$ sudo apt-get install dstat
Installing dstat
Simply run dstat without any options after it has been successfully installed, and you will see something similar to the screen below.
$ dstat
dstat
The output above is a result of a cdngy combination:
- c : CPU : Total cpu usage
- d : Disk : Disk Utilization
- n : Net : Total Network usage
- g : Page : page stats
- y : Sys : system stats
Display time-related details about the CPU, memory, eth0 activity:
$ dstat --cpu --mem --net
This command keeps a record of a single program that uses the most CPU and consumes the most memory:
$ dstat -c --top-cpu -dn --top-mem
The output of Dstat is not intended to be used as an input for other instruments. Dstat is designed to make it as simple as possible for humans to view real-time data. This article does not include all of dstat's capabilities. Since dstat has so many features, you can read its manual page by typing man dstat or dstat -h to see all of dstat's choices.
Similar Reads
How to Audit Network Performance, Security, and Troubleshooting in Linux Network security auditing is the process of assessing a network's health by analyzing and studying the flow of data through the network. Network auditing is one of the critical steps to detect potential security threats and errors within the network. Security audits are either performed manually or
6 min read
Using htop to Monitor System Processes on Linux htop a Linux tool that is used in process-managing and terminal-based system monitoring. It allows real-time monitoring of processes and performs every task to monitor the process in the Linux system. The tool is written in the C programming language by Hisham Muhammad. It displays a complete list o
5 min read
SAR command in Linux to monitor system performance sar (System Activity Report) It can be used to monitor Linux system's resources like CPU usage, Memory utilization, I/O devices consumption, Network monitoring, Disk usage, process and thread allocation, battery performance, Plug and play devices, Processor performance, file system and more. Linux s
9 min read
How to Use Glances to Monitor Remote Linux in Web Server Mode? Glances is a system monitoring tool for Linux machines, it is used to monitor system resources in web server mode or through the web browser. It is an alternative to top and htop monitoring tools. This tool has various features and also provides bits of information on a single screen. Glances is a c
3 min read
Progress - Tool to monitor progress of basic command in Linux Progress is a command-line-based tiny tool which is formerly known as a Coreutils Progress Viewer. This tool is written in the C language. This command looks for the Coreutils basic command like cp, mv, dd, tar, gzip, cat, etc. which are currently running on the system and display the percentage of
2 min read
How to use Linux Cockpit to manage system performance Cockpit is a web-based graphical management tool for Linux machines on your computer. Having Cockpit on your server allows you to manage events on the user interface of a browser. Our typical admin tasks include setting up your firewall, changing your network settings, managing storage, creating acc
5 min read