Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was wondering if there was a way to tell how many more "writes" are left on a file system device in linux? An example: when you move a lot of data to a flash drive, it may not write all data immediately. In this case, I would like to see (preferably) how much more is left to write, or even if it's a flag (such as 0 = writes complete or 1 = writes remain). Is there a particular command or file that holds that information?

share|improve this question

2 Answers 2

You can find out how many kilobytes globally are waiting to be written, contained in "dirty" pages, however I don't know how to do this for individual devices.

grep Dirty /proc/meminfo

There are tunables in /proc/sys/vm and /sys/block/${dev_name} which can affect how rapidly dirty pages are written out; usually, they are modified by software like laptop-mode-tools.

share|improve this answer

Might be useful the following utilities: lsof dstat. Finally, you can force pending writes to be flush to the HDD subsystem with sync CLI command.

share|improve this answer
    
I knew about the sync sync command, which is helpful but I want to be able to see when something needs to be "synced". Both lsof and dstat are helpful, but seem to be a little too broad (not specific enough) for what I'm looking for... –  nuclearpenguin Dec 1 '11 at 15:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.