The UNIX Forums  

Go Back   The UNIX Forums > Special Forums > Filesystems, Disks and Memory
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


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


Other UNIX.COM Threads 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 11:00 AM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-19-2007 09: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 12: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 (permalink)  
Old 10-29-2007
Registered User
 

Join Date: Oct 2007
Posts: 3
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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 (permalink)  
Old 10-30-2007
Registered User
 

Join Date: Oct 2007
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
How about trying df -k
Reply With Quote
  #3 (permalink)  
Old 10-30-2007
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 913
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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 (permalink)  
Old 10-30-2007
Registered User
 

Join Date: Oct 2007
Posts: 8
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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 (permalink)  
Old 10-31-2007
Registered User
 

Join Date: Oct 2007
Posts: 3
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
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 UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



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


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
UNIX Forum Content Copyright ©1993-2008 SilkRoad Asia All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102