Go Back   cPanel Forums > cPanel® and WHM® (for Linux® and FreeBSD® Servers) > cPanel and WHM Discussions

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-09-2008, 12:28 AM
Registered User
 
Join Date: Mar 2007
Posts: 43
gotroot is on a distinguished road
Howcome there is no option to place suexec_log into log rotation?

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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 09-09-2008, 03:10 AM
Registered User
 
Join Date: Oct 2003
Posts: 1,742
dalem is on a distinguished road
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
__________________
Lowest Host/Empire Technology LLC
Affordable hosting solutions http://lowesthost.com
VPS solutions http://empire-hosting.net/vpsspecial.html

Last edited by dalem; 09-09-2008 at 03:21 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 09-09-2008, 10:41 AM
cpanelkenneth's Avatar
cPanel Quality Assurance
 
Join Date: Apr 2006
Posts: 3,222
cpanelkenneth is on a distinguished road
Quote:
Originally Posted by gotroot View Post
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.
cpanellogd should be rotating that once it is larger than 300 MB. What is your full cPanel version number?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-09-2008, 01:22 PM
cpanelkenneth's Avatar
cPanel Quality Assurance
 
Join Date: Apr 2006
Posts: 3,222
cpanelkenneth is on a distinguished road
Quote:
Originally Posted by dalem View Post
cpanellogd has noting to do with the log mentioned in the first post
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
    );
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 09-09-2008, 01:40 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 7,995
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by dalem View Post
cpanellogd has noting to do with the log mentioned in the first post

/usr/local/apache/logs/suexec_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.
__________________
Want our technical analysts to login to your server to assist you? You can contact our technical analysts at: http://tickets.cPanel.net/submit
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 09-09-2008, 02:23 PM
Registered User
 
Join Date: Oct 2003
Posts: 1,742
dalem is on a distinguished road
I stand corrected (but mine never rotates either)
__________________
Lowest Host/Empire Technology LLC
Affordable hosting solutions http://lowesthost.com
VPS solutions http://empire-hosting.net/vpsspecial.html

Last edited by dalem; 09-09-2008 at 03:05 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 01-19-2009, 02:44 PM
Registered User
 
Join Date: Oct 2006
Posts: 47
vikins is on a distinguished road
Thumbs down

Quote:
Originally Posted by cpanelkenneth View Post
cpanellogd should be rotating that once it is larger than 300 MB. What is your full cPanel version number?
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 02:46 PM. Reason: add chkservd.log question
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 01-23-2009, 10:39 AM
Registered User
 
Join Date: Oct 2006
Posts: 47
vikins is on a distinguished road
I wasn't trying to be snide, I really was looking for a comment on this. Any reason for the ridged 300 MB threshold?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 04-29-2009, 10:35 AM
Registered User
 
Join Date: Jan 2008
Location: behind the sun
Posts: 409
Kent Brockman is on a distinguished road
Quote:
Originally Posted by cpanelkenneth View Post
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
    );
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
__________________
Content is king. Functionality is a gift. Usability is God.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 06-02-2009, 03:47 AM
Registered User
 
Join Date: Feb 2003
Posts: 308
internetfab
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.
__________________
David, Systems Administrator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 06-02-2009, 08:43 AM
cpanelkenneth's Avatar
cPanel Quality Assurance
 
Join Date: Apr 2006
Posts: 3,222
cpanelkenneth is on a distinguished road
Quote:
Originally Posted by internetfab View Post
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.
This changed in cPanel 11.24 Rather than automatically rotating logs, you need to configure which logs you want rotated. You can set these in

WHM >> Service Configuration >> Apache Configuration >> Log Rotation
WHM >> Service Configuration >> cPanel Log Rotation
__________________
cPanel Kenneth
cPanel QA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 06-02-2009, 08:59 AM
Registered User
 
Join Date: Feb 2003
Posts: 308
internetfab
Ah alright. That clears it all up. Thanks, will give it a shot.
__________________
David, Systems Administrator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 06-15-2009, 06:55 PM
Registered User
 
Join Date: Aug 2004
Posts: 190
djmerlyn is on a distinguished road
Quote:
Originally Posted by cpanelkenneth View Post
This changed in cPanel 11.24 Rather than automatically rotating logs, you need to configure which logs you want rotated. You can set these in

WHM >> Service Configuration >> Apache Configuration >> Log Rotation
WHM >> Service Configuration >> cPanel Log Rotation
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 06-16-2009, 02:42 PM
cpanelkenneth's Avatar
cPanel Quality Assurance
 
Join Date: Apr 2006
Posts: 3,222
cpanelkenneth is on a distinguished road
Quote:
Originally Posted by djmerlyn View Post
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.
Your information about logrotate.conf is correct.

Your information about WHM >> Service Configuration >> Apache Configuration >> Log Rotation is incorrect. That interface allows you to specify rotation for any log file in /usr/local/apache/logs
__________________
cPanel Kenneth
cPanel QA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 06-17-2009, 05:03 AM
Registered User
 
Join Date: Aug 2004
Posts: 190
djmerlyn is on a distinguished road
Quote:
Originally Posted by cpanelkenneth View Post
Your information about logrotate.conf is correct.

Your information about WHM >> Service Configuration >> Apache Configuration >> Log Rotation is incorrect. That interface allows you to specify rotation for any log file in /usr/local/apache/logs
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

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

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



All times are GMT -5. The time now is 12:17 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc