[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] RE: Clearing Web Log
- Subject: RE: [cobalt-users] RE: Clearing Web Log
- From: "John Burgess" <john.burgess@xxxxxxxxxx>
- Date: Tue May 23 01:08:51 2000
I'll respond too. A little trick you can use if you don't care to keep a
copy of the log file
and you just want to zero it out you can do this: cat > filename<enter>
<ctrl><z>
or some may know this as: cat /dev/null > filename
This won't mess up the log writing routines for some programs that want to
keep writing to the same
as they were before the rm and no sighup is required.
Is this "proper"? It was back when I was teaching Sys Admin for AT&T back
in '89 when they still owned UNIX.
John Burgess
President, Allegro Data Systems
12500 Network, Suite 401
San Antonio, TX 78249
210-558-0709
E-mail <mailto:john.burgess@xxxxxxxxxx>
Fastex.net <http://www.fastex.net/>
> -----Original Message-----
> From: cobalt-users-admin@xxxxxxxxxxxxxxx
> [mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Jeff Lasman
> Sent: Tuesday, May 23, 2000 1:27 AM
> To: cobalt-users@xxxxxxxxxxxxxxx
> 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
>
> _______________________________________________
> cobalt-users mailing list
> cobalt-users@xxxxxxxxxxxxxxx
> To Subscribe or Unsubscribe, please go to:
> http://list.cobalt.com/mailman/listinfo/cobalt-users
>