Help - Search - Members - Calendar
Full Version: Notification When Drive Reaches Critical Capacity?
Linuxhelp > Support > Technical Support
Does anyone have suggestions on how I would go about getting Linux to let me know when a drive is nearing capacity? Such as when the drive is 95% full.

The only way I thought about doing it would be to set a crontab to try to awk out the percentage area of a 'df' command and then shoot me an email if it reported higher than 94%. I'm sure there's a better way to do do this but I haven't found one as of yet.

Can anyone offer suggestions?
*** Post removed by admin ***
Well there can be several solutions....
This is the most easiest one..
Each time you start a terminal...~/.bashrc file is read.So you can have a shell script that will report to you if a particular partition was used up to 95%!!! Now can you write the shell script???
Second is just a minor modification of your idea..(coz i hate crontab) can use at command...which will execute the shell script..and send you mail about the status of hard disk!!!
Third is...if you use that computer yourself quite gkrellm

PS: i will post the shell script soon..coz i am replying to this post from a windoz machine i must check before putting it here!!!
A script would be ideal but I'm unaware of how to write one that would get the job done.

The 'awk'ing of the df command seems very clumsy though..can anyone think of another way to do this?

Also, the machines that will be running this are all remotely controlled and rarely do I log into them unless something messes up. The Gkrellm and the .bashrc idea wouldn't work due to this. An init.d script would be the ideal method.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.