dstat Command in Linux With Examples

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 dispay 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 comamnd will displayy all the stats of the processes.

10. To display help

dstat --help

dstat-help1

dstat-help2

This will display the help section of the dstat command.

My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.