Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Disk usage by customer

by rdfield (Priest)
on Oct 09, 2002 at 09:59 UTC ( #203868=note: print w/replies, xml ) Need Help??

in reply to Disk usage by customer

Maybe I'm off track here but what's wrong with good ole du -sk * from the top level directory?


Replies are listed 'Best First'.
Re: Re: Disk usage by customer
by Preceptor (Deacon) on Oct 09, 2002 at 10:10 UTC
    Well, for starters, du -sk suffers from some of the same problems - large numbers of nfs getattr calls (I'm not entirely sure that it does exactly the same thing, but it's got to count filesizes somehow).
    The second is, we were looking for some flexibility in the system. The 'top level' is owned by the customer, but the lower levels by each of the departments. We need to aggregate the results of the du accordingly. Of course, du -sk /fs001/* followed by 'for i in `ls /fs001`; do du -sk /fs001/$i/*;done' would provide approximately similar results (until we reached the point of 'polluted' directories), but the problem is then you are running a du _twice_. We are talking approx 2.5 Tb of data, and so I'd rather avoid doing it that way.
    It's not pessimism if there is a worse option, it's not paranoia when they are and it's not cynicism when you're right.
      I don't see it.

      Do du -kx, parse the results, then postprocess. Your usage is the usage of your directory minus all of the subdirectories that are owned by someone else. Which is just simple arithmetic.

      Plus du already should handle tricky issues, like the space it takes for a directory to hold the names of the files in the directory.

      Beyond that, you need to get a certain amount of information over your network. See how du performs. If you can, then run du from a machine right next to your NAS to save what you can from the network. Perhaps you can even run it on the NAS box?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://203868]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2018-05-26 07:06 GMT
Find Nodes?
    Voting Booth?