Uncertainty on disk usage report


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Uncertainty on disk usage report
# 1  
Old 02-24-2008
Uncertainty on disk usage report

Hi all,

My system is running on RHEL4. I've just deleted 2 huge tablespaces from Oracle.
Then I saw the disk usage. The report by df differs from the du.

Do you know why they shows different results? Which one is correct?


Code:
[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
...
/dev/sdf1             1.1T  934G  111G  90% /disk6
...

[root@localhost ~]# du /disk6/ -hs
803G    /disk6/

Thank you very much
# 2  
Old 02-25-2008
I would assume that they are both correct. You need to read the description of each command carefully.

"The df utility displays the amount of disk space occupied by currently mounted file systems, the amount of used and available space, and how much of the file system's total capacity has been used."

"The du utility writes to standard output the size of the file space allocated to, and the size of the file space allocated to each subdirectory of, the file hierarchy rooted in each of the specified files."

The difference is space allocated to files which are not a part of the file hierarchy. One way a file can get in this state is for someone to rm it while it is open to a program. Now the file has no name (and thus is invisible to du) but it won't be deleted until the program closes it. Programs also intentionally do this to allocate a private temporary file that is guaranteed to disappear when they exit.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Disk usage monitoring and record the disk used in last 24 hour

HI I am Trying to edit the below code to send email every day with difference of disk utilized in for last 24 hours but instead getting same usage everyday. can you please help me to point out where my calculation is going wrong. Thank you. ================= #!/bin/bash TODAY="at $(date... (0 Replies)
Discussion started by: Mi4304
0 Replies

2. UNIX for Beginners Questions & Answers

UNIX cluster disk usage report generation for yesterday & today and email

HI Team, I am trying to create a shell script to generate a yesterday and today report to compare and email in daily basis. can you please help me on the same. #!/bin/bash #Author: ******************* #Description: This script will return the following set of system information: ... (2 Replies)
Discussion started by: Mi4304
2 Replies

3. Solaris

current CPU usage, memory usage, disk I/O oid(snmp)

Hi, I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP. I want the oids for above tasks. can you please tell me that Thank you (2 Replies)
Discussion started by: S_venkatesh
2 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. Shell Programming and Scripting

disk usage

Hi If the disk space is running low in the home directories, and I cannot add more disk space at the moment. How can I determine who is using the most disk space? (4 Replies)
Discussion started by: tjay83
4 Replies

6. Shell Programming and Scripting

disk usage

Hi ,.. I am working on a script like.... it has to monitor the disk usage (df -H) and if usage is above 95% then it has to return the particular mount point details... i am in confusion to use awk or sed..... regards rrs (1 Reply)
Discussion started by: rrs
1 Replies

7. UNIX for Advanced & Expert Users

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? (8 Replies)
Discussion started by: gfhgfnhhn
8 Replies

8. UNIX for Dummies Questions & Answers

disk usage

how to i find out the disk usage on a server. say in windows examples its like C:/ D:/ and checking out the disk space. how can i find in Unix. can i just use df -k or should i go to each volume group and find that way. plz respond (2 Replies)
Discussion started by: karthikosu
2 Replies

9. UNIX for Dummies Questions & Answers

Disk Usage

Im using solaris 8 on a Sunfire 280r. Is there a command to show you how much disk space is being used in gigabytes or megabytes. I dont think theres an option for this using the df command. not for solaris anyway. thanks (3 Replies)
Discussion started by: lewisoco
3 Replies

10. UNIX for Dummies Questions & Answers

disk usage

what are the ways to check the disc usage by users. I mean to say how to find the biggest space consumer. Regards. (4 Replies)
Discussion started by: asutoshch
4 Replies
Login or Register to Ask a Question