Quote:
Originally Posted by yogesh_attarde
Hi All,
I have written a bash shell script to check disk usage and will send mail if it is above 90%. This script will run everyday. My script is as below:
Now I want it to run everyday morning at 11.00 AM (For this I will setup crontab) and I want to modify it in such a way if disk usage is 80% it should send warning mail only once and if it is 90% it should send alert mail everyday.
|
Ok, so make whatever modifications you'd like...let us know if you're having an actual problem doing it, and we can try to help.
If you're looking for suggestions, you could always always output the disk-usage number into a file and read it, along with the date/time stamp. If the disk usage is between 80 and 89, and the date was yesterday, that means the mail went OUT yesterday, and there's no need to send it again. If it's 90 or more, send an email regardless.
If you're looking for us to make these changes FOR YOU, then post this in the LQ Job Marketplace, along with how much you'd like to pay.