Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I monitor my /backups partition on my Debian-Lenny box?

I have sendmail and I would like to receive an email when my partition gets over, for instance, 80% of its total size.

share|improve this question
up vote 1 down vote accepted

Write simple script that sends e-mail if space usage gets over 80% 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 80%:

df /backups | awk 'NR==2 {sub("%","",$5); if ($5 >= 80) {printf "Warning! Space usage is %d%%\n", $5}}' 
share|improve this answer
Ok, I get the idea. Thanks a lot ! – Jonathan Rioux Jan 25 '11 at 16:00

Have a look at check_disk, which one of the nagios plugins. It is very flexible and the return codes are consistent. It's a tried and true solution.

I'm a big fan of nagios, but you don't need to install nagios server to use the plugins.

share|improve this answer

Your Answer


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.