SUMMARY Log rotater

From: Bill Shorter (jwillie@fast.net)
Date: Mon Oct 09 2000 - 19:36:52 CDT


To rotate the logs of the process that uses odd names, and doesn't
rotate it's own log when you kill -HUP it I found this pretty:

    for CheckFile in `find /local/sites/gen3/logs ! -name \*gz -size +7484c
-print`
    do
      NewFile="$CheckFile.$Date.rotated"
# echo Rotating $CheckFile to $NewFile.
      $CP $CheckFile $NewFile
      $CAT /dev/null > $CheckFile
      $GZIP $NewFile
    done

Moving the origina isn't going to work instead of a copy, the open
filehandle follows it. This traverses a 4gig filesystem very quickly
and looks like it's going to work perfectly.

As per getting the programmers to change, it ain't gonna happen here.
Remember, without the programmers, the system is just hardware and
uselss, according to them. As per management back to get the programmers
to change or do some dirty work, that's less likely. Anyone hiring?

Robert

:wq!
---------------------------------------------------------------------------
Robert L. Harris | Micros~1 :
Senior System Administrator | For when quality, reliability
   at Global Commerce Systems | and security just aren't
                                 \_ that important!

DISCLAIMER:
       These are MY OPINIONS ALONE. I speak for no-one else.

FYI:
  perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T

S
U BEFORE POSTING please READ the FAQ located at
N ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/faq
. and the list POLICY statement located at
M ftp://ftp.cs.toronto.edu/pub/jdd/sun-managers/policy
A To submit questions/summaries to this list send your email message to:
N sun-managers@sunmanagers.ececs.uc.edu
A To unsubscribe from this list please send an email message to:
G majordomo@sunmanagers.ececs.uc.edu
E and in the BODY type:
R unsubscribe sun-managers
S Or
. unsubscribe sun-managers original@subscription.address
L To view an archive of this list please visit:
I http://www.latech.edu/sunman.html
S
T



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:14:19 CDT