LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 05-29-2009, 03:57 AM   #1
cytchiu
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
About df and du


I am running a Redhat EL4 server. When I issued the df command, I found that the mount point / has been used 70%. Everyday I issued the same df command and found that the used space keep increasing 1% every day.

I need to know which file(s) is eating the space, and tried to use the command du. However, it seems that it is not easy to trace the cause. Does anyone know how to do that?
 
Old 05-29-2009, 04:04 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Although I do think your logfiles are increasing you can zoom in on big files like this (as root):

Code:
cd /
du -sch *

cd <biggest dir>
du -sch *

etc.....
du -sch * will give you a human readable list, something like this:

8.0K Cinelerra
16K Create.Pictures
5.8M Documenten
188M Online.Xs4all
148K Playlists
1.7M Stories
2.5G Uitzoeken
3.6G _Kast
944K _Schuur

In this example Uitzoeken and _Kast are the biggest and you can zoom in on those.

This is one way of doing it, there are probably more.

Hope this helps.
 
Old 05-29-2009, 05:32 AM   #3
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Most probably your log files in the /var/log and the files in /tmp.
 
Old 05-29-2009, 07:44 AM   #4
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
you can do a:

Quote:
du -mx / | sort -n -r | head -n 10
That will give you the top 10 biggest directories starting at the / directory. You can change / to any directory you want and you can change 10 to the number of directories you want listed. The m gives it in megabytes and the x stays on the local system( wont show remote mounted directories)
 
Old 06-01-2009, 12:33 AM   #5
jonesr
Member
 
Registered: Feb 2008
Location: Sacramento
Distribution: RHEL AS, mostly
Posts: 44

Rep: Reputation: 18
Yet another -- the 20 largest files modified in the last 24 hours:
Code:
find / -xdev -type f -mtime -1 -exec ls -la {} \; | sort -k5rn | head -20
Compare lists from consecutive days.
 
Old 06-02-2009, 05:31 AM   #6
cytchiu
LQ Newbie
 
Registered: May 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Let me tell you more about my system. I am running a cluster servers, say eform1 & eform2 servers. Both are using oc4j and running a Java app.

The interesting things is, I try to use a freeware Kdirstat to compare the files on both servers. However, I found that the total subtree size for the '/' folder are the same, which is 350M.

Then, I try to type df -h on both servers, the used size are 840M & 669M respectively. And only eform1 server has the file size increment problem, but not the eform2 server.

You can take a look to the screen dump as attached.
Thanks.
Attached Thumbnails
Click image for larger version

Name:	df.gif
Views:	9
Size:	91.4 KB
ID:	748   Click image for larger version

Name:	kdirstat.gif
Views:	9
Size:	52.8 KB
ID:	749  
 
Old 06-02-2009, 05:41 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Did you actually try any of the above suggestions to find the big file(s)?

Knowing which file(s) is/are growing will shed some light on this problem.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 05:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration