tags:

views:

23

answers:

3

When I used to use cPanel it would send me an email when any partitions were approaching full. Is there a script out there that monitors df output that I can put in a cronjob?

Thanks

A: 

don't know if there's already one, but it's not too hard to write. Just put this into your crontab:

df | awk 'NR>1 && $5>80 {print $1 " " $5}'

You should replace 80 with the threshold (percent used) you want to be alerted on. If will mail you the df output for all partitions that cross that usage level.

bluesmoon
Tom
bluesmoon
A: 

It's way overkill for this application, but Nagios monitors disk usage and can email you alerts.

eswald
A: 

Nagios does this (and pretty much everything else). If you're setting up a server, it's a good thing to set up. If this is just for personal use, Nagios is probably overkill.

Ken