From owner-freebsd-questions Wed Aug 18 16:34:56 1999 Delivered-To: freebsd-questions@freebsd.org Received: from inet.chip-web.com (c1003518-a.plstn1.sfba.home.com [24.1.82.47]) by hub.freebsd.org (Postfix) with SMTP id 5A7DE1598A for ; Wed, 18 Aug 1999 16:34:44 -0700 (PDT) (envelope-from ludwigp@bigfoot.com) Received: (qmail 16940 invoked from network); 18 Aug 1999 23:34:52 -0000 Received: from speedy.chip-web.com (HELO speedy) (172.16.1.1) by inet.chip-web.com with SMTP; 18 Aug 1999 23:34:52 -0000 Message-Id: <4.2.0.58.19990818161522.00bdf630@toy> X-Sender: ludwigp@toy (Unverified) X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Wed, 18 Aug 1999 16:33:19 -0700 To: "Alejandro Ramirez" From: Ludwig Pummer Subject: RE: How to reset the log file in free-bsd. Cc: "Lane Covington, Distance Education/Multi-Media Specilist" , In-Reply-To: <006501bee9a9$5b876fa0$d4630a0a@megared.net.mx> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message