tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Ron Bramblett <bramblett () fullerbrush ! com>
To: tru64-unix-managers
Subject: Summary: Script to monitor log sizes
Date: Mon, 06 Mar 2000 20:14:48 +0000	[thread overview]
Message-ID: <96079341819359.tru64-unix-managers.marc@archive.invalid> (raw)

Thanks for the quick responses I had 3 already.

from Michael Bucholtz
you could setup a simple shell script to run via cron to e-mail the size
of
each logfile to you every couple of days..

sample:

#! /bin/ksh
ls -l /var/adm/messages >/tmp/msg.tmp
ls -l /var/adm/sialog >>/tmp/msg.tmp
cat /tmp/msg.tmp | /usr/bin/mailx -s "Logfile sizes" email@address

Not the prettiest thing..but at least you'll know how big certain
logfiles
are

#2 from Jim Fitzmaurice
jpfitz@fnal.gov

Have you tried BigBrother http://bb4.com. It can monitor many things and

has extension scripts to monitor things like log files. With Kermit and
a
modem BigBrother can even send you pages, but it's default is to send
e-mail. It also has a html display you can set up to visually monitor
your
systems. It might be a little overkill in your case but it's OSS and
doesn't
cost anything to download and use. It's definitely worth looking into,
and
personally I don't know what I'd do without it.

#3 from Jeremy Mates

From crontab, call a script similar to the following with agruments of
the full pathname of the file to check, and size limit (in bytes) every
so often:

#!/usr/bin/perl

# first argument is where to find file, second how large it can be
# before squaking
if (-s $ARGV[0] > $ARGV[1]) {
        system("mail cleanup_sap@internal.example.com");
}


I just wasn't sure what the correct way to call a mail system was.
Thanks


--

Ron Bramblett                   | Men never do evil so completely & cheerfully
Systems Administrator           | as when they do it with religious conviction.
The Fuller Brush Company        |                               - Blaise Pascal

                 reply	other threads:[~2000-03-06 20:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox