How to see "Disk read total" and "Disk write total" statistics for processes in the terminal?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Post Reply
HyperBear
Level 3
Level 3
Posts: 115
Joined: Thu May 04, 2023 3:39 am

How to see "Disk read total" and "Disk write total" statistics for processes in the terminal?

Post by HyperBear »

Screenshot from gnome-system-monitor.
Screenshot from 2025-06-17 17-32-37 nemo disk read total.png (8.89 KiB) Viewed 81 times
How to see this information from a command line?

iotop -o -a only measures the data accumulated since iotop was started.
-a, --accumulated
Show accumulated I/O instead of bandwidth. In this mode, iotop
shows the amount of I/O processes have done since iotop started.
gnome-system-monitor shows the amount of data since the process was started, even if gnome-system-monitor was started later.
donalduck
Level 4
Level 4
Posts: 265
Joined: Mon Oct 07, 2013 1:43 pm
Location: there

Re: How to see "Disk read total" and "Disk write total" statistics for processes in the terminal?

Post by donalduck »

do you want to monitor only a specific process disk activity or all ?

this data is extracted from /proc/[pid]/io

Code: Select all

ps -e | grep [n]emo
   1624 ?        00:00:01 nemo-desktop
   5346 ?        00:00:39 nemo

Code: Select all

cat -v /proc/1624/io 
rchar: 6389608
wchar: 1591686
syscr: 5912
syscw: 9467
read_bytes: 30138368
write_bytes: 286720
cancelled_write_bytes: 0

cat -v /proc/5346/io 
rchar: 231429709
wchar: 108927321
syscr: 94594
syscw: 79764
read_bytes: 175763968
write_bytes: 31522816
cancelled_write_bytes: 122880
there are interresting command line utilities in sysstat package.
Post Reply

Return to “Software & Applications”