Compressing Apache Log Files

This is a discussion on Compressing Apache Log Files within the Windows Web Servers forums, part of the Web Server and Related Forums category; can and is it safe to compress apache log files? specifically ssl.logon.log and some other log file that ...


Go Back   Usenet Forums > Web Server and Related Forums > Windows Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-09-2006
ITGuy53
 
Posts: n/a
Default Compressing Apache Log Files

can and is it safe to compress apache log files? specifically
ssl.logon.log and some other log file that i can not seem to think of
right now. that log file that i can't seem to think of right now is
basically when someone logs into "the website", it logs it in. both
log files were at 2.5 Gigs where it maxed out one of my drives. could
or does anyone know if i can compress that one file?

thanks in advance...

  #2 (permalink)  
Old 08-09-2006
Kees Nuyt
 
Posts: n/a
Default Re: Compressing Apache Log Files

On 9 Aug 2006 05:11:01 -0700, "ITGuy53" <micron121@yahoo.com>
wrote:

>can and is it safe to compress apache log files? specifically
>ssl.logon.log and some other log file that i can not seem to think of
>right now. that log file that i can't seem to think of right now is
>basically when someone logs into "the website", it logs it in. both
>log files were at 2.5 Gigs where it maxed out one of my drives. could
>or does anyone know if i can compress that one file?
>
>thanks in advance...


I assume you are referring to
<apacheinstalldir>/logs/access.log
and
<apacheinstalldir>/logs/error.log

Best think to do is switch to another set of logfiles (the
Apache manual refers to a utility for exactly that, though I
must confess I never tried that on Windows).
Then, you can compress the previous logfile (or throw it away
after analysis).

Compressing of active logfiles doesn't seem like a good idea:
- compressing steals CPU time
- you would lose more logging info in case of power loss

The best thing to do is ask yourself if you really need that
much history.
  #3 (permalink)  
Old 08-10-2006
Srinivas
 
Posts: n/a
Default Re: Compressing Apache Log Files

Please try options to rotate logs. This was worked very well on 1.3.27
version and I am currently working on 2.0.58. I was able to configure
the logs to rotate even on 2.0.58, but apache - k restart is not
working. I still trying to find a solution.

Thanks

SRK

Kees Nuyt wrote:
> On 9 Aug 2006 05:11:01 -0700, "ITGuy53" <micron121@yahoo.com>
> wrote:
>
> >can and is it safe to compress apache log files? specifically
> >ssl.logon.log and some other log file that i can not seem to think of
> >right now. that log file that i can't seem to think of right now is
> >basically when someone logs into "the website", it logs it in. both
> >log files were at 2.5 Gigs where it maxed out one of my drives. could
> >or does anyone know if i can compress that one file?
> >
> >thanks in advance...

>
> I assume you are referring to
> <apacheinstalldir>/logs/access.log
> and
> <apacheinstalldir>/logs/error.log
>
> Best think to do is switch to another set of logfiles (the
> Apache manual refers to a utility for exactly that, though I
> must confess I never tried that on Windows).
> Then, you can compress the previous logfile (or throw it away
> after analysis).
>
> Compressing of active logfiles doesn't seem like a good idea:
> - compressing steals CPU time
> - you would lose more logging info in case of power loss
>
> The best thing to do is ask yourself if you really need that
> much history.


  #4 (permalink)  
Old 08-10-2006
ITGuy53
 
Posts: n/a
Default Re: Compressing Apache Log Files

hi kees and everyone-

i really don't need those log files. i've only noticed that those log
files is just to show who has gained access to a secure jsp sites.
same goes for the ssl log. apache is running on 1.3, windows, on a
MSCS cluster environment. i've tested my theory in deleting those two
files after shutting down certain services in Windows, then after
starting up that one services, it would recreate the two files after
and log UserID and IPs on the access log and ssl log. so i guess what
i'm saying is that can i compress the two files or safely delete it? i
would rather compress so that i'm certain that i'm not deleting an
essential part of Apache. but i don't know what the effects are in
compressing these files. plus, as of right now there are no users
accessing the servers.

thanks,

itguy


Kees Nuyt wrote:
> On 9 Aug 2006 05:11:01 -0700, "ITGuy53" <micron121@yahoo.com>
> wrote:
>
> >can and is it safe to compress apache log files? specifically
> >ssl.logon.log and some other log file that i can not seem to think of
> >right now. that log file that i can't seem to think of right now is
> >basically when someone logs into "the website", it logs it in. both
> >log files were at 2.5 Gigs where it maxed out one of my drives. could
> >or does anyone know if i can compress that one file?
> >
> >thanks in advance...

>
> I assume you are referring to
> <apacheinstalldir>/logs/access.log
> and
> <apacheinstalldir>/logs/error.log
>
> Best think to do is switch to another set of logfiles (the
> Apache manual refers to a utility for exactly that, though I
> must confess I never tried that on Windows).
> Then, you can compress the previous logfile (or throw it away
> after analysis).
>
> Compressing of active logfiles doesn't seem like a good idea:
> - compressing steals CPU time
> - you would lose more logging info in case of power loss
>
> The best thing to do is ask yourself if you really need that
> much history.


  #5 (permalink)  
Old 08-10-2006
Kees Nuyt
 
Posts: n/a
Default Re: Compressing Apache Log Files

On 10 Aug 2006 07:34:55 -0700, "ITGuy53" <micron121@yahoo.com>
wrote:

>hi kees and everyone-
>
>i really don't need those log files. i've only noticed that those log
>files is just to show who has gained access to a secure jsp sites.
>same goes for the ssl log. apache is running on 1.3, windows, on a
>MSCS cluster environment. i've tested my theory in deleting those two
>files after shutting down certain services in Windows, then after
>starting up that one services, it would recreate the two files after
>and log UserID and IPs on the access log and ssl log. so i guess what
>i'm saying is that can i compress the two files or safely delete it?


If really you don't need them, shut down those services and
delete them. Apache doesn't need them.

>i would rather compress so that i'm certain that i'm not deleting an
>essential part of Apache.


Logfiles are not essential for Apache. Apache will recreate any
logfile it needs. As long as you don't delete your configuration
file httpd.conf you are fine.

> but i don't know what the effects are in
>compressing these files. plus, as of right now there are no users
>accessing the servers.


If you are in doubt you will ever need those logs
for future reference:
- shut down the Apache service
- rename the logs
- start Apache again
- compress the renamed logs into an .zip
file (much better compression than
MS NTFS compression)
- burn the .zip files on a CD or DVD.
- delete them from disk

>thanks,
>
>itguy


HTH
 


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 12:56 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0