LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Do programs to monitor disk usage exist? (https://www.linuxquestions.org/questions/linux-software-2/do-programs-to-monitor-disk-usage-exist-142299/)

Thrifty 02-04-2004 02:56 PM

Do programs to monitor disk usage exist?
 
I guess the title says it all. Does there exist software that can monitor disk usage across the varied partitions of a computer and notify you if disk space usage has reached a certain threshold? Say, could it be set up so that if 90% of the space was used up on a hard drive, that a message informing me of that could be automatically E-Mailed to me?

Mugatu 02-04-2004 03:14 PM

check out partmon. i have no clue how to use it or anything, but it sounds like what you might be looking for:

Quote:

Checks if a partition is close to full up

Thrifty 02-05-2004 01:05 PM

Quote:

Originally posted by Mugatu
check out partmon. i have no clue how to use it or anything, but it sounds like what you might be looking for:
Is that distribution specific? I use SuSE, and I didn't find anything like that available, nor did I find it available on the installation disc.

Mugatu 02-06-2004 08:24 AM

actually it does look like it is specific to Mandrake; my Slackware box didn't have it. df will tell you how much free space you have--maybe you can set it up to automatically run or something. i wish i could help you more but i'm still learning myself.

czarherr 02-06-2004 10:16 AM

try du

Thrifty 02-06-2004 10:50 AM

Quote:

Originally posted by czarherr
try du
No good. The du command will tell me how much of the drive is being used, but I have to do it manually. I'm looking for something to do automatic alerts and such.

But it's a moot point now. I've found something that should do this for me. Thanks for your help folks.

Mugatu 02-06-2004 11:00 AM

just out of curiosity, what did you find?

Thrifty 02-06-2004 11:12 AM

Quote:

Originally posted by Mugatu
just out of curiosity, what did you find?
Well, it's a script my boss wrote. I'd show it to you, but it's not really my code to share, and he might not be comfortable with me putting that information out there. I don't know what kind of potentially sensitive information a saavy computer whiz reading this board could pluck out of it. I'm probably being paranoid, but I prefer to think of it as "better safe than sorry".

czarherr 02-06-2004 11:18 AM

awww, now is that the Open Source spirit? :P

Thrifty 02-06-2004 11:25 AM

Quote:

Originally posted by czarherr
awww, now is that the Open Source spirit? :P
No. The "Open Source spirit" is currently hiding under the "Don't Get Chewed Out by the Boss" spirit.;)

looseCannon 02-06-2004 12:04 PM

A possible solution
 
Quick and dirty. Modify to fit your needs
Code:

for fs in `df|tail +2|awk '{print $6}'`
do
let percentUsed=`df $fs|tail +2|awk '{print $5}'|cut -f1 -d'%'`
if [ $percentUsed -gt 89 ]
then
  echo $fs is getting full -- it\\'s $percentUsed used
fi
done

That will grab file system that is over 89 percent full and simply tell you it is getting full. You could add additional conditions to it pretty easily. You could pretty easily have this generate an email to send out to alert you.

Stick this in a script and have it run in a cron job every hour, or sooner if you like.


Hmmm. Might have to add this to my profile...

looseCannon 02-06-2004 12:17 PM

Also, another option is to head out to sourceforge and look for LRRD or Munin. It's a little bit of work to install but it tracks a butt load of things about your server. Disk usage, disk space, network traffic, swapping, apache processes, and a bunch of others. Optionally you can have it throw alerts to nagios.

alexr186 02-06-2004 04:35 PM

there is on built in to red hat 9


All times are GMT -5. The time now is 08:12 PM.