Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Jun 1997 20:30:54 -0800 (AKDT)
From:      Steve Howe <un_x@anchorage.net>
To:        Justin Ashworth <ashworth@esus.cs.montana.edu>
Cc:        questions@FreeBSD.ORG
Subject:   Re: out of disk space
Message-ID:  <Pine.BSF.3.95q.970618201732.3871A-100000@aak.anchorage.net>
In-Reply-To: <Pine.OSF.3.95.970618170307.10738A-100000@esus.cs.montana.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 18 Jun 1997, Justin Ashworth wrote:

> Has anybody ever heard of a daemon that would can notify a sysadmin via
> e-mail if the diskspace hits a certain percentage? I'd need to know
> immediately, so a cron job is out of the picture.

i haven't heard of one, but it seems easy enough for
a simple sh "daemon".

something along the lines of (run in background)

#!/bin/sh

toofull=90

while [ 1 ]; do sleep 60

	pfull=`df | grep /dev/partition | cut -c 44-45`
	if [ $pfull -gt $toofull ]; then echo TOO FULL!; fi
done
-------------------------------------------------
 FingerPrint BA09868C 1B995204 58410FD3 A5E7B2DA
 http://www.geocities.com/siliconvalley/way/7747
-------------------------------------------------




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.95q.970618201732.3871A-100000>