Saturday | 21 SEP 2024
[ previous ]
[ next ]

Outstanding Writes in Linux

Title:
Date: 2024-09-05
Tags:  

TIL that you can see quite a bit of useful information in /proc/meminfo:

cat /proc/meminfo
MemTotal:       16251680 kB
MemFree:          173564 kB
MemAvailable:   10696060 kB
Buffers:            3732 kB
Cached:         10987260 kB
SwapCached:         4120 kB
Active:          6651376 kB
Inactive:        8841488 kB
Active(anon):    2257272 kB

You can also see the outstanding writes that haven't been flushed to disk:

cat /proc/meminfo | grep -e Dirty -e Writeback
Dirty:               256 kB
Writeback:             0 kB

This means that there is 256kb that is waiting to be flushed to the disk and 0kb currently being written.

This is helpful when trying to move things to a usb and you have no idea how far the process is in actually writing things to the disk.