JepZ
JepZ

Reputation: 1269

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

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.

Upvotes: 1

Views: 805

Answers (1)

Sagar
Sagar

Reputation: 1870

/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.

Upvotes: 1

Related Questions