From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96079341819359.tru64-unix-managers.marc@archive.invalid> From: Ron Bramblett Date: Mon, 06 Mar 2000 20:14:48 +0000 To: tru64-unix-managers Subject: Summary: Script to monitor log sizes X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96079341819359 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