filesystem monitoring

Dear All,

I am looking for a script by which i get email alert if disk space goes above 80%, while this script should not email unless filesystem reaches 81% and then next email after 82% and on and on.

Regards,
Ghulam Yaseen

IMHO the best thing to do, is to dive into shell scripting, the bootprocess where it’s about starting processes.

I doubt if anyone is goin to write your script. But something like

df /home | tail +2

will give you the percentage.

Also you have to make your design a bit more precise: The following questions come to my mind without much thinking:
. Do you want a mail when the percentage was 83 (mail), got down to 79 and then up up to 81?
. How often do you want to test (I suppose you want a cron run)?
. You have to save to value found at the last run to be used at the next run, where (file in /tmp, elsewhere)?

yup email is prerequisite while percentage increase should trigger email after 80% above filesystem

i have requested here with the great hope and zeal, plz help!

google remains a best friend! i say, because this

linux script monitor disk usage and email admin

in a google search box brings at least one full page of seemingly VERY
likely candidates…have a look and see what you think:

http://www.google.com/search?q=linux+script+monitor+disk+usage+and+email+admin

as another here has already written “I doubt if anyone is goin to
write your script.” but i’d guess if you dig in and try but have
trouble you can’t solve, then post to the programming and scripting
forum here, http://forums.opensuse.org/development/programming-scripting/

(where you might find lots willing to help, but not write the whole
thing for you…)


DenverD (Linux Counter 282315)
CAVEAT: http://is.gd/bpoMD
posted via NNTP w/TBird 2.0.0.23 | KDE 3.5.7 | openSUSE 10.3
2.6.22.19-0.4-default SMP i686
AMD Athlon 1 GB RAM | GeForce FX 5500 | ASRock K8Upgrade-760GX |
CMedia 9761 AC’97 Audio

These are forums, not some kind of market where you can order programs, scripts etc. People coming here, answering questions, helping out on problems all are volunteers. We’re not getting paid to serve user needs, we’re unpaid volunteers spending free time here.

very true,

Knurpht wrote:
> ghulamyaseen;2160969 Wrote:
>> i have requested here with the great hope and zeal, plz help!
>
> These are forums, not some kind of market where you can order programs,
> scripts etc. People coming here, answering questions, helping out on
> problems all are volunteers. We’re not getting paid to serve user needs,
> we’re unpaid volunteers spending free time here.

Sure, but odds are that someone else has already done that and maybe has
a script that they’d be happy to share. It’s not like he’s asking
someone to write him an accounting package.

Or maybe they know of a program that can easily be installed - something
along the lines of gkrellm. I don’t know if gkrellm can send alerts or
not, but if not there’s probably another program out there than can.
Might not be a shell script, but it could suit his purposes just fine…

…Kevin

Kevin Miller
Juneau, Alaska
http://www.alaska.net/~atftb
In a recent poll, seven out of ten hard drives preferred Linux.

You will note that this hasn’t actually answered any of the questions that Henk actually asked; this probably isn’t a problem for anyone else but you, but you should still think about this.

@Knurpht

IMHO the best thing to do, is to dive into shell scripting

Exactly. Try to write a script, and ask further questions when you have a problem. Don’t be embarrassed about the fact that you don’t know how to do it all - few of us do - but try, and then get help on the other bits.

Hi
This should do what you need done, set it to run as a cron job.
http://bash.cyberciti.biz/monitoring/shell-script-monitor-unix-linux-diskspace/


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.45-0.1-default
up 19 days 6:29, 4 users, load average: 1.16, 0.92, 0.64
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 195.36.15