Using dstat

dstat (now often replaced by dool on newer Ubuntu) combines CPU, disk, network, and memory statistics in a single colorized output. It is the most readable real-time overview tool, designed as a replacement for vmstat + iostat + netstat in one view. When you want to watch all system resources simultaneously with one command, dstat is the right tool.

Why dstat?

Without dstat — need multiple terminal windows:
  Terminal 1: vmstat 1          (CPU + memory + swap)
  Terminal 2: iostat -xz 1      (disk I/O)
  Terminal 3: ifstat -i eth0 1  (network bandwidth)

With dstat — everything in one view:
  dstat -cdngm 1
  Shows: CPU, disk, network, paging, memory — all in one line per second

Basic dstat usage

# Install dstat:
sudo apt install -y dstat

# Default view (CPU + disk + net + paging + system):
dstat

# 1-second intervals with color:
dstat 1

dstat default output

----total-cpu-usage---- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai  hiq siq| read  writ| recv  send|  in   out | int   csw
 34   8  55   2    0   0| 892k  445k| 234k  123k|   0     0 | 1.2k 4.5k
 45  12  38   4    0   0| 912k  892k| 345k  234k|   0     4 | 1.8k 5.2k

Custom column combinations

# Select specific metrics with flags:
dstat -c          # CPU only
dstat -d          # Disk I/O only
dstat -n          # Network only
dstat -m          # Memory usage
dstat -g          # Paging/swap activity

# Common combinations:
dstat -cdnm 1     # CPU + disk + net + memory
dstat --top-cpu   # Add column showing highest CPU process
dstat --top-io    # Add column showing highest I/O process

# Full overview with process info:
dstat -cdnmg --top-cpu --top-io 1

dstat with --top-cpu and --top-io

----cpu---- -dsk-- -net-- -mem-- --top-cpu-- --top-io--
usr sys idl|read writ|recv send|used free|cpu  process|process
 45  12  38| 892k 445k| 234k 123k| 3.2G  4.1G|34.5 mysqld | mysqld
 50   8  38| 1.2M 892k| 312k 145k| 3.3G  4.0G|42.1 mysqld | mysqld
# dstat also supports output to CSV for logging:
dstat --output /var/log/dstat.csv -cdnm 60 &    # Background, 60-second intervals

Conclusion

dstat is the best single-screen tool for real-time system performance overview. The --top-cpu and --top-io plugins make it particularly useful for quickly identifying which process is driving CPU or disk activity without needing to run top or iotop separately. On Ubuntu 22.04+, dstat may be replaced by dool (its Python 3 rewrite) — the syntax is identical.

FAQ

Is Using dstat important for Ubuntu administrators?+

Yes. It supports practical Ubuntu administration because it connects directly to server reliability, security, troubleshooting, or daily operations.

Should I practice this on a live server?+

Use a lab VM first. After you understand the command output and rollback path, apply the workflow carefully on real systems.

What should I do after reading this article?+

Run the practice commands, write down what each one shows, and continue to the next article in the Ubuntu roadmap.

Need help with Ubuntu administration?

Work directly with Muhammad Irfan Aslam for Ubuntu Server, Linux, cloud, Docker, DevOps, CI/CD, or infrastructure troubleshooting support.

Hire Me for Support