LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-09-2004, 07:37 AM   #1
mikmok
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

Mik
 
Old 08-09-2004, 08: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, 08:42 AM   #3
mikmok
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.

Bye

Mik
 
Old 08-17-2004, 09:44 AM   #4
djgerbavore
Member
 
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.

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

check it out, see if you like it
 
  


Reply


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 02:15 AM
how to programmatically monitor a process memory usage? thanhvn Linux - Software 1 11-15-2005 09:44 PM
monitor java thread usage against o/s limits rlangsto Linux - General 1 02-11-2005 01:20 PM
how to monitor kernel udp buffer usage? coontie Linux - Networking 0 11-17-2004 12:29 PM
Do programs to monitor disk usage exist? Thrifty Linux - Software 12 02-06-2004 05:35 PM


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

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