Adam Bower wrote:
Time to buy a *much* bigger hard disk ;)
Thanks!
Actually I have plenty of disk space spare (just not on this virtual server), and although I can shuffle things around I'd rather find the cause of the problem. In this case I had a "web" mailbox collecting bounced emails for the last few years unnoticed (Apache runs as "web"). It had accrued 400MB of mail (on a 2GB server that's fairly substantial).
It's actually hovering around 85% full at the moment, and I reckon that it should be closer to 60% if I could spare the time to find all the junk that's accumulated. I have the threshold for the email warning set much lower so that I can test it. I'm running the script every 30 mins and getting one warning every hour or two, which I'm pretty sure is down to hysteresis.
Can I do maths within my script? Eg only if the current %age used value is at least 2% lower than the stored value do I overwrite the stored value, so 85/84/85/84 readings cause 85 to get stored as last reading, but 84 doesn't overwrite it so the subsequent 85 doesn't exceed it and generate an email. (Did that make any sense at all?)