Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

du and dh give different numbers

Status
Not open for further replies.

venkman

Programmer
Oct 9, 2001
467
US
when I run df on my machine it shows that 235Mb are in use in /dev/hda6 which is mounted on /var. doing du from /var shows a total use of 85MB on /var . What's causing this discrepancy?

-Venkman
 
Restarting apache seemed to fix the discrepancy. why?
 
when /var is showing a large amount, use this command;
find /home -size +1000000c -print
hopefully it will find a particular file causing this. Maybe a log?
 
the problem was that there was no such file, or du would've picked it up, yet df was reporting the size to be so large. it occurred just after I deleted a buch of large file on /var. I'm guessing that df has a cache that reads from and it didn't update the cache... is that the case? or possibly that the memory blocks themselves continued to be reserved for files that no longer existed, but for some reason when I restarted apache, whose executable and data resides on var, the reservations were removed? It's no longer a serious problem, but I'm just curious what caused it in the first place. any ideas?

-venkman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top