![]() Which has the advantage that you get to see some immediate progress. In one window and in another: watch -n 1 "sort -nr < /tmp/du.txt" Rather than running du -max-depth=2 | sort -n or similar (which due to the | pipe only shows results after the complete file system has been scanned) I typically run du -max-depth=2 | tee /tmp/du.txt even with unlimited quota set, disk quota reporting is a quick and easy way to determine who, which user/group ID's are the disk hogs.Īlthough a PITA in other regards setting users/applications up with their own volume/partition/filesystem(s) rather than using only a single root file-system allows you to run the quick df which limits the amount of searching you need to do.set hard- and soft-quota limits and the offending run-away user/process will be halted before completely filling up the file-system and impeding other users/processes. ![]() Not fashionable anymore and your mileage may vary, but enabling quota on file systems (beforehand) has several potential advantages. This allows you to identify current active processes that may be writing many smaller files rather than a single large file. Once you have the PID you can run ls -l /proc//fd/* and see where exactly the process is writing to. 1 root root 64 Sep 8 10:09 /proc/876/fd/6 -> /var/log/httpd/_access_logĪnd similar IO monitoring allows you to identify the process(es) generating the most IO. ![]() Something similar would be du -sL /proc/*/fd/* |sort -n and then following the most interesting file descriptor links: du -sL /proc/*/fd/* |sort -n Often a first level of approach and assumption is that a single large file being written is the culprit, you can restrict your search to files that are currently open and only check the size of those. Directory meta-data simply doesn't hold enough information about their children and children's children to avoid scanning all sub-directories and files individually and creating a disk usage tally. As far as I am aware there is no real alternative to using tools that scan the complete file system to find current disk hogs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |