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.

How to clear the Error Log?

Discussion in 'General Discussion' started by JackieServer, Oct 11, 2009.

  1. JackieServer

    JackieServer Registered

    Joined:
    Oct 7, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    So how can I clear the error log?

    Thanks.
     
  2. thewebhosting

    thewebhosting Well-Known Member

    Joined:
    May 9, 2008
    Messages:
    1,201
    Likes Received:
    1
    Trophy Points:
    38
    Using the below mentioned URL, you can easily rotate your logs as needed.

    www.logview.org
     
  3. JackieServer

    JackieServer Registered

    Joined:
    Oct 7, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Hi, thanks for the link but isn't there a way to just clear the log with a simple command or something from SSH (I have root access)?

    I just hate to install a whole new script just to clear the log as my server resources are already taxed as it is.
     
  4. saninfosys.com

    Joined:
    Oct 4, 2009
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
  5. lehels

    lehels Well-Known Member

    Joined:
    Jul 10, 2006
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    This way:
    shell# > /path/to/the/error_log
     
  6. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    I recommend determining what is causing the error log to fill up so that clearing the log doesn't become part of your regular server maintenance. Such an investigation may assist with secondary issues you may not be currently aware of.
     
  7. linux7802

    linux7802 Well-Known Member

    Joined:
    Dec 14, 2007
    Messages:
    232
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    As you mentioned you are having error logs problem on your server.In that case I would like to recommend you please check the error logs and found out the exact error message which causing the such heavy error logs problem and correct the files which consuming error logs in daily basis so that there is no need to empty error logs file.
     
  8. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
    Or atleast, make a tarball of the recent logs before just emptying it !
     
Loading...

Share This Page