[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] RE: Clearing Web Log



I'm curious, why not just issue:

cat > logname

Then <enter> to clear out any logs that need zero'd out. You then have to hit
"Ctrl C" to return to prompt, but it will zero out the log file in question
without causing problems for the log.

When the RaQ3's were sick with all their log file rotation and stats reporting
issues, we had to go in on a daily basis and issue this command to each server
because the main access and error logs grew so large.. We've used this method
many times without any problems.

Good Luck!
David D


> > [mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Jeff Lasman
> > Sent: Tuesday, May 23, 2000 1:27 AM
> > Subject: Re: [cobalt-users] RE: Clearing Web Log
> >
> > I thought I'd responded to this; is this a second copy?
> >
> > My only addition to this would be to do both commands in one shell
> > script, so they'll happen as close together in time as possible.
> >
> > Jeff
> >
> > hostmaster@xxxxxxxxxxxxxxxxx wrote:
> >
> > > The correct procedure is to move the logfile, then signal
> > Apache to tell it to
> > > reopen the logfiles.
> > > Apache is signaled using the SIGHUP (-1) signal. e.g.
> > >
> > > mv access_log access_log.old
> > > kill -1 `cat httpd.pid`
> > >
> > > Note: httpd.pid is a file containing the process id of the
> > Apache httpd
> > > daemon,
> > > Apache saves this in the same directory as the log files.
> > > Many people use this method to replace (and backup) their
> > logfiles on a
> > > nightly
> > > or weekly basis.
> > >
> > > The above information was taken directly from the apach.org
> > website.  Please
> > > review the following URL for verification:
> > >
> > >         http://www.apache.org/docs-1.2/misc/howto.html#logreset
> > --
> > Jeff Lasman <jblists@xxxxxxxxxxxxx>
> > nobaloney.net
> > P. O. Box 52672
> > Riverside, CA  92517
> > voice: (909) 787-8589  *  fax: (909) 782-0205

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1