Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-09-2004, 06:37 AM   #1
LQ Newbie
Registered: Dec 2003
Posts: 28

Rep: Reputation: 15
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

Old 08-09-2004, 07:19 AM   #2
bruno buys
Senior Member
Registered: Sep 2003
Location: Rio
Distribution: Debian
Posts: 1,509

Rep: Reputation: 46
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...
Old 08-17-2004, 07:42 AM   #3
LQ Newbie
Registered: Dec 2003
Posts: 28

Original Poster
Rep: Reputation: 15
thank you

Thank you for your kind reply,
my final (and not very smart ) 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.


Old 08-17-2004, 08:44 AM   #4
Registered: Jun 2004
Location: PA
Distribution: Fedora (latest git kernel)
Posts: 458

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

check it out, see if you like it


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to programmatically monitor a process memory usage? thanhvn Programming 14 02-20-2009 01:15 AM
how to programmatically monitor a process memory usage? thanhvn Linux - Software 1 11-15-2005 08:44 PM
monitor java thread usage against o/s limits rlangsto Linux - General 1 02-11-2005 12:20 PM
how to monitor kernel udp buffer usage? coontie Linux - Networking 0 11-17-2004 11:29 AM
Do programs to monitor disk usage exist? Thrifty Linux - Software 12 02-06-2004 04:35 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:33 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration