Quick Linux Tip #56 - My SSD Is Wearing Out. Which Process Is Writing the Most?

Quick Linux Tip #56:

Try: sudo iotop -aoP -d 5

Info: iotop tracks real-time disk I/O. -a accumulates total I/O since start, -o filters active processes, and -P groups activity by process instead of thread.

Examples:

  • $ sudo iotop -o  # Show only processes actively performing I/O
  • $ sudo iotop -b -n 5 > iotop.log  # Run in batch mode and save output
  • $ pidstat -d 1  # Check per-process I/O activity

Note: Excessive writes can contribute to SSD wear over time. Monitor drive health and wear indicators with smartctl -a /dev/sda. You may need to install iotop and smartmontools first.




LinuxTeck.com
linuxteck@ubuntu:~$ sudo iotop -aoP -d 5
Total DISK READ:        2.34 M/s | Total DISK WRITE:       45.67 M/s
Current DISK READ:      0.00 B/s | Current DISK WRITE:      23.45 M/s

  PID  PRIO USER       DISK READ   DISK WRITE   SWAPIN     IO  COMMAND
 3456  be/4 mysql          234 M      12.34 G    0.00 % 45.23 % mysqld
 2134  be/4 root          45.6 M       2.34 G    0.00 %  8.12 % journalctl
 5678  be/4 elastic       123.4 M       1.89 G    0.00 %  6.45 % java -Xms1g
 1234  be/4 nginx          12.3 M        567 M    0.00 %  2.34 % nginx: worker
 4321  be/4 root            2.3 M        123 M    0.00 %  0.89 % systemd-journald

linuxteck@ubuntu:~$

PREVIOUS ARTICLE Quick Linux Tip #55 - Check Exported Symbols in .so Files
About John Britto

John Britto Founder & Chief-Editor @LinuxTeck. A Computer Geek and Linux Intellectual having more than 20+ years of experience in Linux and Open Source technologies.

View all posts by John Britto →

Leave a Reply

Your email address will not be published.