Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 19
  1. #1
    Member
    Join Date
    Mar 2007
    Posts
    43

    Default 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.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Posts
    1,924

    Default

    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

  3. #3
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,782
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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?

  4. #4
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,782
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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
        );

  5. #5
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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.

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Posts
    1,924

    Default

    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

  7. #7
    Member
    Join Date
    Oct 2006
    Posts
    49

    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 01:46 PM. Reason: add chkservd.log question

  8. #8
    Member
    Join Date
    Oct 2006
    Posts
    49

    Default

    I wasn't trying to be snide, I really was looking for a comment on this. Any reason for the ridged 300 MB threshold?


  9. #9
    Member
    Join Date
    Jan 2008
    Location
    Buenos Aires, Argentina
    Posts
    942
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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

  10. #10
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Feb 2003
    Location
    Gothenburg, Sweden
    Posts
    324

    Default

    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.

    twitter: oderland_david

  11. #11
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,782
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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
    Kenneth
    Product Manager
    cPanel, Inc.

  12. #12
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Feb 2003
    Location
    Gothenburg, Sweden
    Posts
    324

    Default

    Ah alright. That clears it all up. Thanks, will give it a shot.

    twitter: oderland_david

  13. #13
    Member
    Join Date
    Aug 2004
    Posts
    200

    Default

    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.

  14. #14
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,782
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    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
    Kenneth
    Product Manager
    cPanel, Inc.

  15. #15
    Member
    Join Date
    Aug 2004
    Posts
    200

    Default

    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!

Similar Threads & Tags
Similar threads

  1. Option for cPanel Log Rotation based on Dates, not File Sizes
    By DomineauX in forum Archived Feature Requests
    Replies: 6
    Last Post: 02-23-2012, 09:51 AM
  2. Log Rotation?
    By dragon2611 in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 06-04-2010, 06:19 PM
  3. Log Rotation
    By zigzam in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-02-2009, 07:06 AM
  4. Log rotation
    By bmcclure in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-18-2003, 09:53 AM
  5. Log Rotation
    By sketchified in forum cPanel and WHM Discussions
    Replies: 43
    Last Post: 12-10-2002, 09:02 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube