I mean, ours was reaching 2gb. Is there a reason why this was left out of the log rotation option in WHM? Seems like this is a fairly important oversight.
Believe it or not, this is the 3rd largest log file on our boxes.
I mean, ours was reaching 2gb. Is there a reason why this was left out of the log rotation option in WHM? Seems like this is a fairly important oversight.
Believe it or not, this is the 3rd largest log file on our boxes.
log rotation has been like this on a cpanel server since the beginning of time.
despite many bugzilla reports reports I guess since log rotation is not really a cpanel task but a server task it up to you
Just edit your /etc/logrotate.conf
and add under
# system-specific logs may be also be configured here.
/usr/local/apache/logs/suexec_log {
weekly
rotate 4
}
#you might want to add these (they are likly not being rotated either)
/usr/local/apache/logs/access_log {
weekly
rotate 4
}
/usr/local/apache/logs/error_log {
weekly
rotate 4
/var/log/chkservd.log {
weekly
rotate 4
}
# seems they added a log rotation feature in WHM for cpanel logs when did they do that![]()
Last edited by dalem; 09-09-2008 at 02:21 AM.
Lowest Host/Empire Technology LLC
Affordable hosting solutions http://empire-hosting.net
List Your hosting site FREE in http://hostgeneration.com
The rotatelogs function in cpanellogd will rotate certain system logs, one of which being /usr/local/apache/logs/suexec_log. You can examine the function yourself. It starts on line 750 of /usr/local/cpanel/cpanellogd
Code:sub rotatelogs { my ($logsize); my $didtruncate = 0; my @LOGS = qw( /usr/local/apache/logs/suexec_log /usr/local/apache/logs/ssl_engine_log /usr/local/apache/logs/access_log /usr/local/apache/logs/error_log /usr/local/apache/logs/mod_jk.log /usr/local/apache/logs/referer_log /usr/local/apache/logs/agent_log /usr/local/apache/logs/ssl_log /usr/local/apache/logs/suphp_log /usr/local/apache/logs/ssl_data_log /etc/httpd/logs/error_log );
To ease confusion, please elaborate how you feel cpanellogd which handles /usr/local/apache/logs/suexec_log log rotation (shown above by a member of our QA staff) is irrelevant to a discussion about /usr/local/apache/logs/suexec_log (presumably the suexec_log referred to in the original post) not being properly rotated. Thanks.
I stand corrected (but mine never rotates either)
Last edited by dalem; 09-09-2008 at 02:05 PM.
Lowest Host/Empire Technology LLC
Affordable hosting solutions http://empire-hosting.net
List Your hosting site FREE in http://hostgeneration.com
Can I just ask why 300 MBs? If you add up all the logs at 300 MB each that is a lot of wasted space. Why can't it just work like "/usr/sbin/logrotate /etc/logrotate.conf" but use the WHM gui for configuration instead of coming up with an off the wall and seemingly arbitrary scheme?
Also, will "/var/log/chkservd.log" rotation be available through WHM at some point?
Thanks
Last edited by vikins; 01-19-2009 at 01:46 PM. Reason: add chkservd.log question
I wasn't trying to be snide, I really was looking for a comment on this. Any reason for the ridged 300 MB threshold?
![]()
Hi, those are the logs being rotated by the cPanel Log Rotation Configuration function at WHM, right? I don't understand why are present in the array two error_log locations (marked in bold), and how are they being handled? since this screen in WHM only shows one error_log checkbox: are they being merged in one gzipped file? Some clarification about this would be nice.
Thank you
Well I guess we have a faulty cpanel installation then, since suphp_log just hit 2GB and cpanellogd is running..
Can't say I've seen these logs being rotated ever on any of our servers.
Kenneth
Product Manager
cPanel, Inc.
Ah alright. That clears it all up. Thanks, will give it a shot.
This only covers /usr/local/cpanel/logs folder though, not /usr/local/apache/logs (or any other folder for that matter).
There is no error_log/access_log/suphp_log rotation for apache. You have to manually configure logrotate.conf which isn't terribly difficult, just another step in configuring a cpanel server.
Kenneth
Product Manager
cPanel, Inc.
ahaha, I looked there so many times, finally now I see it.
Whats weird that I noticed while configuring logrotate though, is that I have never configured error_log nor access_log because they "appear" to already be being rotated by something.
Is that rotation not part of the error and access log accounting for users? And if I enable rotation on those logs won't I be disturbing the rotation of users logs that they have access to (domlogs et al)? I've never rotated them and they've never grown out of control, maybe I'm just lucky but they look like they're being rotated already with no known configured intervention.
Thanks!