Help - Search - Members - Calendar
Full Version: Notification When Drive Reaches Critical Capacity?
Linuxhelp > Support > Technical Support
geesh
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?
BillGates
*** Post removed by admin ***
Hemant
Well there can be several solutions....
1.
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???
2.
Second is just a minor modification of your idea..(coz i hate crontab)..you can use at command...which will execute the shell script..and send you mail about the status of hard disk!!!
3.
Third is...if you use that computer yourself quite often...run 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!!!
geesh
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-2017 Invision Power Services, Inc.