
08-13-2010 12:28 AM - edited 08-13-2010 12:29 AM
Hi
i have one issue that apache log file size on my server (error.log, access.log) has increased to (3.27 GB, 1.62 GB).
Due to this we are not left with much free space in our drive.
How to reduce to size of these logs and how to restrict the file size.
we are using officescan 10.0
Thanks
Tarun
08-14-2010 09:32 AM
If you don't think you need the logs, I would just delete them to reclaim the space. Most likely what happened is that you enabled Smart Scan and then have done scheduled scans on your endpoints. The first time you do scheduled scans after enabling Smart Scan, every file on each endpoint is checked and this creates a lot of HTTP requests to the Smart Scan server. This shouldn't be a continuing problem, so deleting the logs may be all you need to do.
If you want to delete the logs do the following:
1. Stop the Apache2 services
2. Delete the log files (or move them to another system for storage)
3. Start the Apache2 services
Alternatively, you could disable logging completely and then just re-enable it if you ever have trouble or a need to collect the logs. You can find out how to disable the logging via Google, but I believe you just need to go in to the httpd.conf file and comment out the lines related to the logging, and restart the service.
Ryan
05-26-2011 02:05 PM
Hi,
That file when I first noticed it was 62 gig, so there is no limit on how big it can get. so here is what you do. Firstly, you are strapped for space, so delete it. Go to the httpd.conf file, open it in Notepad, go down to the line that says Loglevel ***** - it's a few lines down. Set it to Loglevel emerg, and then save it. Now the server will only log the emergency events. If at a later stage you need more info, you can go back there and set it.
Httpd.conf is in c:\program files\Trend Micro\security server\PCCSRV\Apache2\conf
Good luck and have a good one.
Peter
08-01-2011 01:31 PM
I dealt with those Apache logs in a different way, performing a daily log rotation with a further compression of them.
In the httpd.conf file add (in bold):
# ErrorLog logs/error.log
ErrorLog "|D:/OfficeScan/PCCSRV/Apache2/bin/rotatelogs.exe logs/errorlog.%Y-%m-%d.log 86400 -180"
#CustomLog logs/access.log common
CustomLog "|D:/OfficeScan/PCCSRV/Apache2/bin/rotatelogs.exe logs/access.%Y-%m-%d.log 86400 -180" common
Mind your OFSC path according your installation. Don't forget the pipeline character '|'.
86400 is the amount of seconds to rotate logs
-180 is the GMT offset (-3 GMT) in minutes.
Best regards
Daniel
Copyright (c) 1989-2012 Trend Micro Incorporated. All rights reserved.
