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

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?

rdfield

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://203868]
help
Chatterbox?
Your Mother reminds the monks they should be grateful not to share an office, lest they be subjugated to constant inanities like, "Czech please!"
[LanX]: what's strange is that the "Cowboy you said this already" message is missing #dqiwd
[LanX]: YM: BTW learn to mute your humanity
[Your Mother]: Cumin? Now I want tacos...
[Eily]: there should be an option in grep for fuzzy order of the letters in the pattern
[Eily]: as in "I might have inverted two, but my eyes misread in the some order as my fingers mistype"
[LanX]: can't find a definition for the sound

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (12)
As of 2017-03-27 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (320 votes). Check out past polls.