Home > OS >  How can I show size of the filesystem cache that has to be synced?
How can I show size of the filesystem cache that has to be synced?

Time:03-06

With the command sync I can synchronize the filesystem cache to the physical disks. But how can I see how much data still has to be synced?

This could be helpful to see how much time it will take until I can remove a USB stick.

CodePudding user response:

/proc/meminfo can tell you this information:

cat /proc/meminfo | grep -e Dirty -e Writeback 

According to kernel documentation,

Dirty
              Memory which is waiting to get written back to the disk
Writeback
              Memory which is actively being written back to the disk

I don't think there is a way to determine how much Dirty or Writeback memory is specific to a device though.

  • Related