2

I have a local filesystem which is exported rw with nfs (very big xfs partition).

Somewhere (I cannot determine who or what remote process) files are being written, created new or updated appending more data; and the free disk space is quickly running low.

To identify what files I could move somewhere else safely, I though about command like:

find . -type f -mtime +15 -size +100M
find . -type f -mmin -2 

but is there a general way to call find or any other system utility to track which file is currently growing/being written (remotely)?

  • 1
    IIRC, if a file are unlinked, but still open, find will not locate it and it can still fill the disc. – Anthon Jun 2 '13 at 9:38
3

The easiest way would probably be to use iotop it is like top but lists I/O operations. That should show you which processes/files are writing the most data.

NAME
       iotop - simple top-like I/O monitor

DESCRIPTION
       iotop  watches  I/O  usage  information output by the
       Linux kernel (requires 2.6.20 or later) and  displays
       a  table of current I/O usage by processes or threads
       on the system. At least  the  CONFIG_TASK_DELAY_ACCT,
       CONFIG_TASK_IO_ACCOUNTING,  CONFIG_TASKSTATS and CON‐
       FIG_VM_EVENT_COUNTERS options need to be  enabled  in
       your Linux kernel build configuration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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