The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Logs

Discussion in 'General Discussion' started by jeff3, Oct 3, 2006.

  1. jeff3

    jeff3 Member

    Joined:
    Oct 3, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,
    I'm confused as to why the entries in /usr/local/cpanel/logs/ log files are being deleted after 7 days. Where can I modify this setting? I most likely want to set up logrotate once I keep the files from being cycled.
     
  2. WeMasterz5

    WeMasterz5 Well-Known Member

    Joined:
    Feb 24, 2003
    Messages:
    361
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Miami
    maybe via your WHM

    Tweak Settings/Stats and Logs



    .
     
  3. angelina_holy

    angelina_holy Well-Known Member

    Joined:
    Aug 6, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    You can change a large number of global settings on your server. These changes affect all users of the machine, including yourself, resellers, and resellers' customers.

    whm>>Stats and Logs

    Keep Stats Log (/usr/local/cpanel/logs/stats_log) between cPanel restarts - Enables WebHost Manager to keep the statistics log when restarting the application.

    Keep log files at the end of the month - Maintains old log files after the end of each month. If not ticked, log files are deleted after each month.

    Number of days between processing log files and bandwidth usage - Enter the number of days between processing log files and bandwidth usage in the adjacent field. Decimal values are allowed.
     
  4. jeff3

    jeff3 Member

    Joined:
    Oct 3, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    This is a step in the right direction. However I already had the "Keep Stats Log" checked.
    The file /usr/local/cpanel/logs/access_log is what I need.
    The problem is after 7 days, the log entries in this file are deleted, and a new file is started.
    I would like to keep the file from being deleted every 7 days.
    Any idea where that setting is kept?

    jeff
     
  5. Anne

    Anne Member

    Joined:
    Oct 4, 2006
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    Logs should not delete weekly, For that you have make changes in /etc/logrorate.conf on
    line no 6 rotate 4 change it to rotate 10.
     
    #5 Anne, Oct 5, 2006
    Last edited: Oct 5, 2006
  6. angelina_holy

    angelina_holy Well-Known Member

    Joined:
    Aug 6, 2006
    Messages:
    113
    Likes Received:
    0
    Trophy Points:
    16
    Try adding a logrotate

    check at http://www.webhostgear.com/144.html


    pico /etc/logrotate.conf

    cPanel is not rotating its own logs either. Place this in the same file we have been editing:


    /usr/local/cpanel/logs/access_log {
    weekly
    rotate 4 # will keep 4 weeks worth of backlogs
    }
     
  7. jeff3

    jeff3 Member

    Joined:
    Oct 3, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Unfortunately logrotate makes no mention of that directory.. That was why I posted to begin with. I figured cpanel had something that tried to rotate the logs, and it wasn't working correctly, so thought I would just set up logrotate.
    My access_log is being cleaned every 7 days, and I have no idea why.
     
Loading...

Share This Page