tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Summary: Script to monitor log sizes
@ 2000-03-06 20:14 Ron Bramblett
  0 siblings, 0 replies; only message in thread
From: Ron Bramblett @ 2000-03-06 20:14 UTC (permalink / raw)
  To: tru64-unix-managers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-03-06 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-03-06 20:14 Summary: Script to monitor log sizes Ron Bramblett

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