dstat(1)
dstat is a versatile replacement for vmstat, iostat, netstat and ifstat that displays system resource statistics in real-time with customizable output.
Synopsis
dstat [options] [delay [count]]Description
dstat gathers and displays detailed information about system resources including CPU, memory, disk I/O, network traffic, and processes in a single, colored, real-time view. It updates periodically (default 1 second) and can log data to files or CSV format for analysis.
Unlike traditional tools, dstat combines multiple monitoring sources and allows custom plugins for extended functionality. The output is highly configurable and defaults show the most commonly monitored metrics.
Common options
| Flag | What it does |
|---|---|
-c | display CPU statistics (user, system, idle, wait) |
-d | display disk I/O statistics (read/write rates) |
-n | display network statistics (send/receive rates) |
-m | display memory statistics (used, buffer, cache, free) |
-g | display page statistics (in/out) |
-p | display process statistics (runnable, new processes) |
-l | display load average statistics |
-s | display swapping statistics |
--output FILE | write output to a file for later analysis |
--csv | output data in CSV format for spreadsheets |
-a, --all | shortcut for -cdngs (CPU, disk, network, page, swap) |
--nocolor | disable colored output |
Examples
display default metrics (CPU, disk, network, paging) updating every 1 second
dstatshow time, CPU, memory, and swap statistics with timestamp column
dstat -tcmsdisplay disk I/O and utilization percentage, updating every 5 seconds for 10 iterations
dstat -d --disk-util 5 10log network statistics to CSV file for post-analysis
dstat -n --net --output report.csvshow top CPU and memory consuming processes in real-time
dstat --top-cpu --top-memdisplay all common metrics without colors, updating every 2 seconds
dstat -a --nocolor 2monitor CPU, memory, swap and socket statistics every 3 seconds indefinitely
dstat -tcms --socket 3 0