The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > Filesystems, Disks and Memory
Google UNIX.COM


Filesystems, Disks and Memory Questions involving NAS, SAN, RAID, Robotic Libraries, backups, etc go here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" iBot UNIX and Linux RSS News 0 01-04-2008 12:00 PM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-19-2007 10:52 PM
how could i make a program mixed with many "|", "<" and ">" strugglingman High Level Programming 2 04-29-2006 05:11 AM
No utpmx entry: you must exec "login" from lowest level "shell" peterpan UNIX for Dummies Questions & Answers 0 01-18-2006 01:15 AM
how to request a "read" or "delivered" receipt for mails plelie2 Shell Programming and Scripting 1 08-06-2002 12:26 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-29-2007
Registered User
 

Join Date: Oct 2007
Posts: 3
any alternative to "du -s" ?

Hi! We have a large filesystem with 1,8 mio files and 16000 directories. Sometime developers think, they have to do some funny changes and start to fill up some directories within. as there are about 20 applications running, it is somehow difficult, to find out, who ist filling up the fs. "find . -print" runs 58 minutes, "du -s" runs for ages.
Is there any other way to find which directory is filling up??

thx
Reply With Quote
Forum Sponsor
  #2  
Old 10-30-2007
sunsysadm2003's Avatar
Registered User
 

Join Date: Oct 2007
Posts: 10
How about trying df -k
Reply With Quote
  #3  
Old 10-30-2007
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,253
df -k tells you only the utilization of the *whole* filesystem, not the directories which are most responsible for the utilization.

I don't think there is a better way to analyze this than "du -ks * | sort -rn", but probably this runs for several hours on such a large filesystem.

A solution (well, not the most elegant one, but maybe better than nothing) would be to use a "spare" mirror and work on that, quasi-offline.

You create a mirrored filesystem (i don't know about your system, in AIX this is simple) or a third mirror if it is mirrored already. Regularly (say, once a day) you split one mirror off, mount this on some other machine as a FS and do your checks there. After being finished you can resync again with the original and split again the next time....

bakunin
Reply With Quote
  #4  
Old 10-30-2007
sunsysadm2003's Avatar
Registered User
 

Join Date: Oct 2007
Posts: 10
I use df -k or df -h (Solaris 9 and above) to identify which disk slices are filling up. Then I do something like the following:

To find files that are 500k of characters or over

find / -xdev -size +500000c -exec ls -al {} \; | more

Does that help any ??
Reply With Quote
  #5  
Old 10-31-2007
Registered User
 

Join Date: Oct 2007
Posts: 3
thx for input ... but ...

df only gives me the whole lot (what i allready have, because df in cron is setting the alarm). ANY find takes quite some while. find . -print for instance takes 59 minutes. So i think i have to strip down a global search into "sneaking" into specific directories to keep the response within a reasonable timerange (30 to 60 minutes). a pitty, that "du" always goes all way down it's tree in directory.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0