Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Nov 2003 22:17:19 +0100 (CET)
From:      Mikolaj Rydzewski <miki@ceti.pl>
To:        isp@freebsd.org
Subject:   Re: Daily/weekly/monthly output aggregation
Message-ID:  <Pine.LNX.4.58.0311172206590.609@hermes.dom>
In-Reply-To: <E4AAC34FE3CF564D8AE89EB8AC333FD7091655D2@xmb03crdge.crd.ge.com>
References:  <E4AAC34FE3CF564D8AE89EB8AC333FD7091655D2@xmb03crdge.crd.ge.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 17 Nov 2003, Lapinski, Michael (Research) wrote:

> The way I deal with it is by the size of the message,
> day in day out the messages are usually +- a few bytes
> different in size when things go normal. Maybe write
> something that flags messages smaller or larger then
> the daily average of the runs...

Hello,

Why don't you like the idea: no output means no errors? Just create your
periodic scripts to produce no output when everything is fine. Cron will
not mail you anything what has produced no results.

Just to get the idea.  I know, it isn't fool proof; there are more secure
ways to do this, etc. But it works ;-)

#!/bin/sh

log=`mktemp /tmp/.log.XXXXXX`

# ... perform your stuff, i.e.
/usr/local/sbin/backup > $log 2>&1

if [ $? -ne 0 ]; then
	cat $log
fi
rm -f $log


-- 
Mikolaj Rydzewski      <miki@ceti.pl>        http://ceti.pl/~miki/
                    PGP KeyID: e17c4bd5
There are three kinds of people: men, women and unix.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.58.0311172206590.609>