[wplug] Extended "du" reporting.

Bill Moran wmoran at potentialtech.com
Wed Aug 4 14:53:43 EDT 2004


Burt E Reany <breany at csc.com> wrote:

>    When getting a message that a physical filesystem has reached the 90%
> full level, my normal "cd /", "du -s *" gives me the directory size for
> each root -level directory.  Since our NFS-mounts are in further
> subdirectories, the root directory size INCLUDES the disk space for the
> remote mounted filesystem, as well as that on the root hard drive, so we
> have to subtract that disk space of the remote filesystem from the "du"
> figure to get the amount of space on the primary drive of interest.  Now
> that we're getting more such mounts, it's turning into work.
> 
>   What would be a help is a perversion of "du" - - er, rather, a
> flavor/option of "du", that would give the disk space used ONLY ON THE
> PHYSICAL DISK OF THE DESIGNATED DIRECTORY. By excluding remotely mounted
> filesystems, the directory having the inflation problem would be more
> obvious.
> 
>   Of the approaches to getting this - "C", script, etc - there will be some
> approaches that work better than others. Before investing too much time in
> this,  might I ask the group their opinion as to the most elegant and
> effective approach to helping find which directories have grown to create
> this type of space problem?

The FreeBSD version of du has a -x option, which tells du not to follow
mountpoints (thus giving you the result you desire)

I'm surprised that the version you're using doesn't provide this.

It's quite possible that you could grab FreeBSD's du and build it on your
Linux machine.  You could even (potentially) replace Linux's du.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



More information about the wplug mailing list