Date: Wed, 18 Aug 1999 16:33:19 -0700 From: Ludwig Pummer <ludwigp@bigfoot.com> To: "Alejandro Ramirez" <ales@megared.net.mx> Cc: "Lane Covington, Distance Education/Multi-Media Specilist" <covingtl@mcc.montgomery.cc.nc.us>, <questions@FreeBSD.ORG> Subject: RE: How to reset the log file in free-bsd. Message-ID: <4.2.0.58.19990818161522.00bdf630@toy> In-Reply-To: <006501bee9a9$5b876fa0$d4630a0a@megared.net.mx> References: <XFMail.990818201434.jesusr@ncsa.es>
next in thread | previous in thread | raw e-mail | index | archive | help
Except Apache is special. http://www.apache.org/docs/misc/howto.html#logreset >How to reset your log files >Sooner or later, you'll want to reset your log files (access_log and >error_log) because they are too big, or full of old information you don't need. >access.log typically grows by 1Mb for each 10,000 requests. >Most people's first attempt at replacing the logfile is to just move the >logfile or remove the logfile. This doesn't work. >Apache will continue writing to the logfile at the same offset as before >the logfile moved. This results in a new logfile being created which is >just as big as the old one, but it now contains thousands (or millions) of >null characters. >The correct procedure is to move the logfile, then signal Apache to tell >it to reopen the logfiles. For example: mv access_log access_log.old apachectl restart (apachectl may not be in your path, so you may have to specify the full path to it on the command line) At 01:42 PM 8/18/1999 -0500, Alejandro Ramirez wrote: > If you just want to clean up your file without deleting the file or >having to kill the process, you coul try the following "cat /dev/null > >httpd-access.log" and your file will be 0 length and working. > > > On 18-Aug-99 Lane Covington, Distance Education/Multi-Media Specilist >wrote: > > > I have a really large 85meg httpd-access.log file. How do I reset this > > > log file after I have moved the file with mv httpd-access.log > > > http-access.old and then compressed it. But could not determine how to > > > signal free-bsd a process id with the kill -TERM 'cat httpd.pid' to > > > start a new file. Did not see any reference to this in the handbooks. > > > Could you reply please. > > > Lane, Distance Education Tech --Ludwig Pummer <ludwigp@bigfoot.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.2.0.58.19990818161522.00bdf630>