![Forrest logo](/images/logo.png)
dstat:tldr:30cf7
The dstat command is a versatile and powerful tool used primarily for system monitoring and performance analysis on Linux systems. It provides real-time information about various system resources such as CPU usage, disk activity, network bandwidth, system load, and more.
By running the "dstat" command in the terminal, you will get a continuous stream of statistics related to different system parameters. These statistics are presented in a tabular format, updating at regular intervals. The default interval is usually 1 second, but you can specify a different interval if needed.
The output of the dstat command includes columns representing various metrics such as CPU usage (user, system, idle), disk activity (reads, writes), network bandwidth (received, transmitted), system load (1 min, 5 min, 15 min), and memory usage (used, buffers, cache).
Furthermore, dstat allows you to customize the output by specifying different options and arguments. You can choose specific metrics to display, change the refresh interval, set the number of iterations, show additional system information, and more.
Here are some common examples of using the dstat command:
-
To display all available statistics in real-time:
dstat
-
To specify the refresh interval (e.g., 5 seconds):
dstat -t 5
-
To show CPU, disk, and network statistics only:
dstat -c -d -n
-
To display memory usage, swap, and system load:
dstat -m -s --load
Overall, the dstat command is a valuable tool for monitoring system performance, diagnosing bottlenecks, troubleshooting issues, and gaining insights into the resource utilization of your Linux system.