Open In App

dstat Command in Linux With Examples

Improve
Improve
Like Article
Like
Save
Share
Report

dstat is a tool that is used to retrieve information or statistics form components of the system such as network connections, IO devices, or CPU, etc. It is generally used by system administrators to retrieve a handful of information about the above-mentioned components of the system. It itself performs like vmstat, netstat, iostat, etc. By using this tool one can even see the throughput for block devices that make up a single filesystem or storage system. 

Installation of dstat command

On RedHat based OS 

yum install dstat

On ubuntu or debian  

sudo apt install dstat

Working with dstat Command

1. To display statistics of major OS components  

dstat
 

dstat command in Linux

This command will display CPU, Disk, Network, Paging and System stats. 

2. To display information that was to be displayed by vmstat tool 

dstat --vmstat 

vmstat-dstat

The above command results in the process and memory stats. 

3. To display stats of process using most of the CPU. 

dstat -c --top-cpu

dtstat-most-cpu

This will display the stats of the process which is consuming most of the CPU. 

4. To display stats of process using most of the memory.  

dstat -d --top-mem

dstat-most-mem

This will display the stats of the process which is consuming most of the memory. 

5. To display the list of all plugins 

dstat --list 

dstat-list-all-plugins

Plugins are the options you want to display the stats of. The above command will list all such plugins. 

6. To force float values to be printed 

dstat --float

to-force-float-values-dstat

This will force the float values to be printed which were hidden earlier. 

7. To force bits values to be printed. 

dstat --bits

to-force-bits-values

This will print all the values in bits that were earlier used to be printed in bytes. 

8. To display the output without colors 

dstat --nocolor

dstat-no-color-in-output

This command will now display the outputs in white color only. 

9. To get all stats of the processes. 

dstat -a

dstat-get-stat-of-all-process

This command will display all the stats of the processes. 

10. To display help 

dstat --help

dstat-help1dstat-help2

This will display the help section of the dstat command.
 


Last Updated : 02 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads