httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Artiom Morozov <art...@phreaker.net>
Subject Re: Cleaning log files
Date Wed, 13 Mar 2002 12:05:25 GMT
Imho it's not, however logs are not very well suitable for 
post-processing with analyzers, if rotated that way. Also restarting 
apache may not be good for very heavy loaded machine. So it all depends.

On 2002.03.13 11:36 RuneImp wrote:
> I use a croned shell script after all logs have been
> processed by PerlFect DailyStats.
> 
> All logs are place within this type of directory
> structure.
> 
> /usr/home/domainname.tld/web/logs/access.log
> /usr/home/domainname.tld/web/logs/error.log
> 
> This is the script:
> 
> #!/bin/sh
> for file in /usr/home/*/web/logs/*.log; do
>         echo Trimming $file
>         tail -5000 $file > temp
>         mv temp $file
> done
> /usr/local/sbin/apachectl graceful
> 
> 
> Is this a bad practice?
> 
> 
> -=- RuneImp
> ImpTech - Web Design, Hosting & Computer Tech
> http://imptech.net
> rune@imptech.net
> 
> 
> ----- Original Message -----
> From: "Artiom Morozov" <artiom@phreaker.net>
> To: <users@httpd.apache.org>
> Sent: Wednesday, March 13, 2002 1:14 AM
> Subject: Re: Cleaning log files
> 
> 
> depends on how you're transferring logs to files, but in general -
> it's
> not. use logrotate(8) or rotatelogs from apache distribution.
> 
> On 2002.03.13 11:02 Dror Braznitzki wrote:
> > Hello,
> >
> > Is it safe to clean log files using 'cat /dev/null > log_file' while
> > the
> > server is running ?
> > Is there a better way of doing it ?
> >

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message