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.

Clearing cPanel Error Logs (the one with the cpanel icon Error Log)

Discussion in 'General Discussion' started by durangod, Sep 9, 2014.

  1. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    On the last shared server i was on the error in this section went away after a day or so and i loved seeing the empty page. :)

    But now on this VPS i still have items from august in here. I would love to clear them out... is there a way.

    this is the one when you click the icon you see this text and a window under it.


    I have read alot of threads about logs but nothing i found gives me a good answer so far.


    How do you clear the old ones? via ssh or via whm and where are they? thanks
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,676
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Browse to the "Stats and Logs" tab in "WHM Home » Server Configuration » Tweak Settings" and ensure the following option is enabled:

    "Delete each domain’s access logs after stats run"

    Then, if you don't want to wait for the next stats run, update the statistics for the user manually via:

    Code:
    /scripts/runweblogs $username
    Thank you.
     
  3. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    Hi, is there a step 2 because that was already enabled?

    i did change this

    from 300 to 10 but everything else on this page looks good. But i dont think that setting is going to do it because it wont clean it out completly
     
    #3 durangod, Sep 10, 2014
    Last edited: Sep 10, 2014
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,676
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Are you sure that statistics are updating successfully for this account? Are there any errors when running the command I provided?

    Thank you.
     
  5. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    hi, just pm'd you the run, no error that i can see, but i still have all that stuff in there even after that..
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,676
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I was under the impression you were referring to the "Latest Visitors" option, and thus my instructions were directed towards that. I see now you are referring to the option called "Error Log" within cPanel. This data comes directly from:

    Code:
    /usr/local/apache/logs/error_log
    You would have to manually empty the log file with a command such as:

    Code:
    echo "" > /usr/local/apache/logs/error_log
    Or, configure a lower threshold for "Log rotation size threshold" under "Stats and Logs" in "WHM Home » Server Configuration » Tweak Settings" and then ensure the Error Log is included in "WHM Home » Service Configuration » Apache Configuration » Log Rotation".

    Thank you.
     
  7. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    ok well that gets me half way there.. thanks... at least i have a direction, appreciate that very much... I have a email into my old host to see how he had it set up. I doubt very seriously if he did that manually, i know him and he would never take the time to do that all the time for all the accounts. He had to of had some special automated way. Because i remember i would have an error and then fix it, and then it seemed in a few hours or by the next day at least, it was clean, nothing in it. So there must be a way to set that up automated.. :)
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,676
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    If the log threshold is set to a very low level, then it would likely rotate much sooner. Note that errors are generally helpful and it's often better to address what's causing the error log to fill up in the first place.

    Thank you.
     
  9. durangod

    durangod Well-Known Member

    Joined:
    May 12, 2012
    Messages:
    251
    Likes Received:
    10
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    ok we will see how it goes, i will leave it as is for now to see how it rotates, i have quite a bit of config deny set up so it wont take that long to find out.... by the way its clean now and thanks, im so glad i did not have to do that per account...

    :) appreciate it
     
Loading...

Share This Page