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

amirash
  • 129
  • 3

3 Answers3

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

Andrew Taylor
  • 884
  • 4
  • 6
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}}' 
Jonathan Rioux
  • 1,938
  • 6
  • 33
  • 57
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.

Richlv
  • 2,354
  • 1
  • 13
  • 18