how do i do that if space is less than x% it will notify me by mail? i have ubuntu and my HD are LVM

link|improve this question

0% accept rate
1  
possible duplicate of serverfault.com/questions/226684/… – uloBasEI Jan 25 '11 at 18:41
feedback

3 Answers

Monit can do this for you; there are plenty of other applications as well. For a single box, I like Monit because it's easy to setup and it's light on resources.

Andrew

link|improve this answer
feedback

Write a simple script that sends email if space usage gets over x% and add it to crontab. On FreeBSD crond sends an e-mails with output of each called program, probably on Debian it does the same. If not - use any CLI e-mail client, mail(1) for example.

Example of script that checks space usage and prints warning if it is more that x%:

df /backups | awk 'NR==2 {sub("%","",$5); if ($5 >= <your percent>) {printf "Warning! Space usage is %d%%\n", $5}}' 
link|improve this answer
feedback

It heavily depends on what your requirements are. If you have multiple systems you would like to watch, Zabbix will easily monitor things like free diskspace and notify you in case of any problems. If that's a single system, a simple script might be more simple to implement.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.