du and dfspace reporting | Unix Linux Forums | SCO

  Go Back    


SCO Santa Cruz Operation (SCO) was a software company based in Santa Cruz, California which was best known for selling three UNIX variants for Intel x86.

du and dfspace reporting

SCO


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 09-11-2012
dextergenious dextergenious is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 17 December 2013, 1:48 AM EST
Posts: 40
Thanks: 2
Thanked 0 Times in 0 Posts
du and dfspace reporting

Hi,

I am using SCO UNIX version 6.0.0 release 5. I am using du and df space to see the used space in the / partition. I am using du -k option to get count in 1024 k so that it directly makes kb. In dfspace I subtracted the used mb from total size mb which should be the used space and then convert to GB. But the output from du -k (converted to gb ) donot match this output of dfspace (converted to gb)

Here it goes :


Code:
> du -k  =  38339676 (kb) = 38.3 gb
 
> dfspace 
 
788718.80 MB of 851248.99 MB available

so 851.2 gb - 788.7 gb = 61gb approx. used space in /

I suppose , these should match, but they didn't .

Any help is appreciated.

regards,

dexter

Last edited by methyl; 09-12-2012 at 02:29 PM.. Reason: code tags
Sponsored Links
    #2  
Old 09-11-2012
hicksd8 hicksd8 is offline Forum Advisor  
Registered User
 
Join Date: Feb 2012
Last Activity: 27 November 2014, 12:42 PM EST
Location: Cornwall, UK
Posts: 854
Thanks: 46
Thanked 159 Times in 144 Posts
http://www.unix.com/unix-dummies-que...isk-space.html
Sponsored Links
    #3  
Old 09-12-2012
dextergenious dextergenious is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 17 December 2013, 1:48 AM EST
Posts: 40
Thanks: 2
Thanked 0 Times in 0 Posts
Hi,

< http://www.unix.com/unix-dummies-que...isk-space.html >

The links explains that df will use the block size to give the usage details. My system block size is 1024bytes and for that the outputs are not matching. I already know that block size is something which affects the usage reported, but my question was after implementing that logic. I used DU with block size of 1024 and df space is also using 1024 b block size (or let me know how to check df's used block size)

My query still remains...

regards,

Dexter

---------- Post updated at 10:41 AM ---------- Previous update was at 10:34 AM ----------

And BTW, I talked about "dfspace" and not "df". Reporting by dfspace is in MB . I donot know the underlying princile of how it reports the usage.

Dexter
    #4  
Old 09-12-2012
jlliagre jlliagre is online now Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 27 November 2014, 10:48 PM EST
Location: Paris
Posts: 4,454
Thanks: 17
Thanked 480 Times in 432 Posts
You should post both
Code:
du -k

and
Code:
df -k

precise output.
Code:
dfspace

is apparently a just df wrapper.
Is the discrepancy still there after a reboot ?

Last edited by jlliagre; 09-15-2012 at 04:39 AM..
Sponsored Links
    #5  
Old 09-12-2012
dextergenious dextergenious is offline
Registered User
 
Join Date: Mar 2009
Last Activity: 17 December 2013, 1:48 AM EST
Posts: 40
Thanks: 2
Thanked 0 Times in 0 Posts
On my partition /

du -k | tail -1 gives

38253272 (last line is the summantion )

df -k -v gives


Code:
/          /dev/root            871678974  63965476 807713498     8%

i.e it shows used blocks (1024) = 63965476 whereas du shows 38253272

I know that du is primarily for directory and file contents and df for partition but 38 gb and 63 gb are a big difference . Is 25 gb being taken by filesystem contents ???

regrads,

dexter

Last edited by radoulov; 09-18-2012 at 08:24 AM..
Sponsored Links
    #6  
Old 09-12-2012
jgt's Avatar
jgt jgt is offline Forum Advisor  
Registered User
 
Join Date: Apr 2007
Last Activity: 20 November 2014, 8:48 PM EST
Location: 44.21.48N 80.50.15W
Posts: 1,563
Thanks: 1
Thanked 160 Times in 152 Posts
From the man page for du. (SCO 6.0.0)
Quote:

The du command gives the number of blocks contained in all files
and directories recursively within each directory and file
specified by the list in the names argument. The block count
includes the indirect blocks of the file. If names is not
supplied, the current directory is used.

NOTE: "Indirect blocks" refers to blocks used by the filesystem
to store pointers to the actual data blocks that are part of the
file. Hence for large files (that is, those which use large
numbers of pointers), the du command reports disk usage larger
than simply the data blocks associated with the file contents.
Sponsored Links
    #7  
Old 09-12-2012
jlliagre jlliagre is online now Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 27 November 2014, 10:48 PM EST
Location: Paris
Posts: 4,454
Thanks: 17
Thanked 480 Times in 432 Posts
@dextergenious: again, is this discrepancy still there after a reboot ?

Is your file system clean ? (fsck)
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sar command not reporting RobSand Solaris 2 02-17-2009 02:38 PM
Reporting SU and Failedlogins janet Shell Programming and Scripting 1 02-24-2006 09:51 AM
regarding dfspace girish_shukla SCO 1 06-24-2004 11:14 AM
Progress reporting Ypnos UNIX for Dummies Questions & Answers 9 05-28-2003 12:25 PM
Reporting Mike11 UNIX for Dummies Questions & Answers 3 12-14-2000 10:48 PM



All times are GMT -4. The time now is 12:08 AM.