1

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

1

3 Answers 3

1

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

0

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}}' 
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .