Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
1  
possible duplicate of serverfault.com/questions/226684/… –  uloBasEI Jan 25 '11 at 18:41

3 Answers 3

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

share|improve this answer

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}}' 
share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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