Index: [Article Count Order] [Thread]

Date:  Sat, 28 Jun 2008 09:33:58 -0700
From:  "Ken Marcus - Precision Web Hosting, Inc." <kenmarcus (at mark) precisionweb.net>
Subject:  [coba-e:13423] Re: purging logfiles
To:  <coba-e (at mark) bluequartz.org>
Message-Id:  <216f01c8d93c$c4d70470$6601a8c0@OfficeKen>
References:  <4865FC69.9000901 (at mark) mixfans.org>
X-Mail-Count: 13423


----- Original Message ----- 
From: "Dennis" <dennis (at mark) mixfans.org>
To: <coba-e (at mark) bluequartz.org>
Sent: Saturday, June 28, 2008 1:55 AM
Subject: [coba-e:13421] purging logfiles


> Is it possible to have logfiles from the vhosts / server being purged from 
> a certain date
> or do a certain maintenance on it?
>
> My server is running for 3 years now and I see that it take hours for the 
> webalizer / internal logfiles to finish the logfile stuff.
> causing some load on the server or when there is some load it waits 
> forever to finish ..
>
> Tips appreciated.
>
> Dennis
>


Dennis

Generally webalizer will run 50 times faster if you turn off the reverse dns 
lookup option.

The command I use to do that (in a cron) is:
perl -p -i -e 's/^DNSCache/#DNSCache/g' /etc/webalizer.conf



You can carefully delete  the logs with the commands below. Check for line 
wraps etc, as you don't want to accidentally delete all your sites.

rm -Rf /home/sites/www.*/logs/200*

rm -f /home/sites/www.*/logs/web.log.*.gz

rm -Rf /home/.sites/server/logs/*

#and possibly:

rm -f /home/sites/www.*/logs/*





----

Ken Marcus

Ecommerce Web Hosting by

Precision Web Hosting, Inc.

http://www.precisionweb.net