The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
disk usage rrs Shell Programming and Scripting 1 04-13-2007 03:48 AM
disk usage karthikosu UNIX for Dummies Questions & Answers 2 06-29-2006 03:48 PM
Disk Usage lewisoco UNIX for Dummies Questions & Answers 3 05-09-2006 08:44 PM
Disk usage (Mac OS 10.4) H1tokori UNIX for Dummies Questions & Answers 5 12-05-2005 07:37 PM
disk usage asutoshch UNIX for Dummies Questions & Answers 4 04-01-2001 08:02 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-02-2006
gfhgfnhhn gfhgfnhhn is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 77
Exclamation disk usage (df vs du)

displaying the disk usage using df
and displaying the disk usage using du -sk
gives me different results:

1st case: df -k |grep users

2nd case: cd /users; du -sk

sometimes this difference is 50 gigabyte!!!
do you have any idea about this situation?
  #2 (permalink)  
Old 08-02-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,929
You are aware that 'df' only reports usage stats on filesystems, yes? 'du', on the other hand, measures directory contents.
  #3 (permalink)  
Old 08-03-2006
gfhgfnhhn gfhgfnhhn is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 77
disk storage is used for what else than directory contents?
  #4 (permalink)  
Old 08-03-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Is there just one mount point that has the word "users" as part of the filename?
Check the output for my system:
Code:
# cd /netbackup
# df -k |grep netbackup
/dev/vx/dsk/sysdg/netbackup 1536000 1439224   96080    94%    /netbackup
# du -sk .
1422240 .
The difference is 1439224 - 1422240 = 16984 (and this is in KB). You should not be getting difference of 50GB or so... can you post the actual outputs?
  #5 (permalink)  
Old 08-03-2006
gfhgfnhhn gfhgfnhhn is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 77
currently i cannot post actual output as we dont have this problem now.
we killed almost all the processes running on the machine,
to be able to make some links to another disks.
right after killing the processes we observed that,
output of df , rapidly decreased and came to a value very close to
output of du.
this may be a coincidence.
but another possibility is that the processes may allocate some temporary space
in the disks, because there were lots of long-time running processes which are doing heavy operations on database and also on unix files.
does it make sense?

i will send the actual outputs if the problem occurs again.

thanks for your concern...
  #6 (permalink)  
Old 08-03-2006
gfhgfnhhn gfhgfnhhn is offline
Registered User
  
 

Join Date: Mar 2006
Posts: 77
currently we have 0.7 gigabyte difference:

root@london:/> cd /users
root@london:/users> du -sk
70384708 .
root@london:/users> df -k| grep /users
DGC051#fs2 108000000 71011701 36988299 66% /users
root@london:/users>
  #7 (permalink)  
Old 09-22-2006
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
See this link - differences between du and df
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:47 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0