LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   monitor partition usage (https://www.linuxquestions.org/questions/linux-newbie-8/monitor-partition-usage-215313/)

mikmok 08-09-2004 06:37 AM

monitor partition usage
 
Hi all,

i need to understand wich process is using every day more and more space on my disk.

doing the df -h i can see that the free space is every day less

the logrotation is working.

can anyone suggest me a smart way to monitor the disk usage or to make a script to sort the directories by their disk usage ?

thank you very much

Mik

bruno buys 08-09-2004 07:19 AM

I did something like this, a while ago...
I used to have a script that run in init, and it used two commands: one created a file

touch /home/bruno/diskusage

and owned the file to me

chown bruno:users

then, I pumped the output of some reporting commands to it, with date and some formatting, to ease my life..:

echo "********" >> /home/bruno/diskusage
date >> /home/bruno/diskusage
df -B MB >> /home/bruno/diskusage

and also, some other aspects of the system:

hdparm /dev/hda |grep dma #with lines for every ide device on my machine...

Notice that if you pump with >> the command won't erase what's in the file, instead it will append. So, what you have is a log formatted like this:

********
Date 12/08/2004 etc etc...

output of df
output of hdparm
and so on...
************

To sort directories you'll have to figure...

mikmok 08-17-2004 07:42 AM

thank you
 
Thank you for your kind reply,
my final (and not very smart :rolleyes: ) solution as in treesize professional a m$ application used on a samba linux share that gives you what i need, a fast and easy to undestrand view of disk usage of a volume.

Bye

Mik

djgerbavore 08-17-2004 08:44 AM

i wrote a little tutorials that emails you if your disk is getting close to full.

http://www.linuxquestions.org/questi...09#post1113809

check it out, see if you like it


All times are GMT -5. The time now is 04:29 AM.