Is that possible without manually writing a script? It seems a big problem on many servesr. PLESK has it's own log rotation system. Several domains always end up breaking apache due to their 2gb log file sizes.
Is that possible without manually writing a script? It seems a big problem on many servesr. PLESK has it's own log rotation system. Several domains always end up breaking apache due to their 2gb log file sizes.
You can set the logs to rotate after every stats run, which then only keeps the records since the last stats run: WHM > Tweak Settings > Delete each domain's access logs after stats run
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
I have one domain on the server that is passing the 2GB filesize limit for its domlog around the 20th of each month.
But I'd like to keep the raw logs for more than 24 hours in case I need to refer to them.
Are there any easy ways to:
1.) only delete/reset the domlogs when they pass say 1.5 GB in size
2.) rotate the domlogs on a weekly basis to something like domain.ext.2 domain.ext.3 and domain.ext.4
Or some other way to keep the log files for more than 24 hours and yet still keep them from growing beyond 2 GB?
you could set logrotate /etc/logrotate.conf instead of cpanel doing it
to rotate your domain logs for you then you would have your domain.com domain.com.1 domain.com.2 etc
I use logrotate to rotate my domain SSL logs
works just fine
If you use logrotate cpanel may miss some of the information as it may be removed before the stats program gets a chance to get at it. Alternatively, you could have the logs rotate on each run and have the users save their log files via cpanel. Otherwise, put in a feature request ( enhancement ) via bugzilla.cpanel.net to allow for "on demand" and "X days till rotate".
Beau Henderson
its allready there use the logschedule in add on modules and any losses would be negligibleIf you use logrotate cpanel may miss some of the information as it may be removed before the stats program gets a chance to get at it.
but I agree this needs to be a feature enhancemet to combat large log files
Last edited by dalem; 02-27-2005 at 12:22 AM.
I just installed log schedule from the cpanel addons section, but it doesn't seem to have anything to do with log rotation. It gives me a choice of which times I do not want logs to be processed - but it doesn't seem to deal at all with the actual rotation of the log files???Originally Posted by dalem
Yup there's confusion with some people here between logrotate (an OS application that rotates server logs) and logrunner (the application that cPanel uses to rotate domlogs). They're different things. Logrotate does not rotate your domlogs. Logshcedule is an addon for affecting when logrunner runs. However, the OP is talking about logrotate.
Without seeing what logrotate is doing on the server it's difficult to know where the problem lies. You could try running it interactively and see if it is balking on a certain log file:
/usr/sbin/logrotate -vf /etc/logrotate.conf
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
At the risk of asking a stupid question...Originally Posted by chirpy
Let's say I turn this option (above) on so that domain access logs are deleted after a stats run. The upside is of course that we have much smaller domlog sizes. But what are the downsides? What are the negative or side effects of doing this? What does it change as far as your average cPanel-using customer is concerned? Realistically, to what extent does it diminish the ability of a server administrator to do his/her job effectively?
Thanks for your comments.
- Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia
This thread pretty much covers it:
http://forums.cpanel.net/showthread.php?t=32078
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
thanks for that chirpy. I did search first - honestly! Maybe vbulletin and others could work on a more sophisticated built-in search engine for their forums in order based on more accurate relevancy scores! :-)
- Web Design Perth .:. Itomic Business Website Solutions of Perth, Western Australia
Hi
Please vote for better logrotate for domlogs and stats features and fixes.![]()
http://bugzilla.cpanel.net/show_bug.cgi?id=3153
cheers
Andy