LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   wierd problem - Disk Utilization (https://www.linuxquestions.org/questions/linux-newbie-8/wierd-problem-disk-utilization-707810/)

vikas027 02-26-2009 03:04 PM

wierd problem - Disk Utilization
 
Hi All,

I gave a interview yesterday. I did well on all files / server configuration etc.

I could not answer few questions, one of them is :-



We have a partition say /tmp of 2 GB, in df -kh command it is showing all utilized i.e. 100 % disk utilization.
BUT when we fire command du -sk /tmp, it is showing only 1 GB. How will you trouble shoot this.



Pls help me with this.

Thanks in advance.

kentyler 02-26-2009 03:18 PM

You could use lsof.

vikas027 02-26-2009 03:44 PM

Quote:

Originally Posted by kentyler (Post 3458605)
You could use lsof.

Could you please explain a bit. How would lsof help me. It will only show me which all files are being used at that point of time.

x_terminat_or_3 02-27-2009 05:43 AM

Exactly, and sizes of files that are currently being written to, or, are open for writing, do not always reflect actual size on disk.

Use lsof to determine what process(es) are using the file, then either wait for the process to finish, or somehow, terminate the process, then look again at the file size.

kentyler 02-27-2009 08:02 AM

Yes it would have showed files that are not viewable also, like in the instance of oracle which uses space but creates no visible file.

Oh, also it may be out of inodes because they don't always take up all the disk space but will give the error the file system is full because there is a limit to 'how many' files may be on a file system as well.

You could delete loads of small files that were not needed to cure the problem.

vikas027 02-28-2009 07:03 AM

Thanks to all, I should have though that ways :)


All times are GMT -5. The time now is 11:59 PM.