SUMMARY: Re: Clearing log file doesn't work (many methods attempted)

From: Ian Wallace <iwallace_at_eforceglobal.com>
Date: Thu Nov 21 2002 - 12:12:25 EST
A big thank you to all whom responded!  Basically b/c of the way that
this application server runs under Solaris there is *no* way to rotate
the logs.

Many pointed out that if a process has the file open (and on this
application server each server has this file open - which is close to 12
per machine that we run), those file descriptors will be writing to the
file in a particular spot (say 30MB into the file).  Even if I clobber
the contents with my heavy handed cat /dev/null > file.log I'm still
going to have 30MB of 'space' at the front of the file.  Which is really
what I don't want, and ls will still report the maximum size of the
file.

One method of getting around this (which I have not had time to test) is
to do something like what the Apache server does/did which is write to
an application (I guess through a pipe?) and have it write to the log,
which then can be rotated (since only one application has the log open
at this point you can construct it so that it'll rotate the file, or
handle a signal to do that).  There was a small application called
zwrotlog which looked promising but I have not had time to fiddle with.

Thanks again for all the helpful suggestions, it turns out, after
further review that this log file is actually on a local disk, so my
first idea that the EMC array was messing things up is completely off
base.

cheers
ian



-- 
Ian Wallace - iwallace@eforceglobal.com
303.218.2040 (w) 720.308.5696 (m) 303.218.2100 (f)
eForce Managed Services, Denver CO 
Enterprise IT Solutions. Fixed Price. Fixed Time.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Nov 21 20:01:50 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:02 EST