Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Cpanel Stats_log becomes too big

Discussion in 'General Discussion' started by mina, Dec 31, 2002.

  1. mina

    mina Active Member

    Joined:
    Mar 3, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    301
    I found /usr/local/cpanel/logs/stats_log grows too fast.

    I think when /scripts/upcp is done, that file is resetted.
    But now I've chosen manual update only, that log file has grown too big.

    -rw-r--r-- 1 root root 1.7G Dec 30 22:06 stats_log

    Any solution to this issue?

    Thank you.
     
  2. taivu

    taivu Well-Known Member

    Joined:
    Nov 22, 2001
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    306
    Reset the log file?
    cp /dev/null /usr/local/cpanel/logs/stats_log
     
  3. mina

    mina Active Member

    Joined:
    Mar 3, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    301
    Thank you taivu.

    Just resetting that file is OK?
    I've already done that though.

    I saw that log but couldn't understand why same process repeated so many times.
     
  4. taivu

    taivu Well-Known Member

    Joined:
    Nov 22, 2001
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    306
    The reason for &repeated processes& is simple: the logfile is for statistic programs (Webalizer, Analog). Every time they run (once a day) they add entries to the logfile.

    I clean the logfile every now and then, after taking a look at the latest entries. Since you are resetting the file, not deleting it, it will not cause any hiccups with the statistic programs.
     
  5. BlueBeBe

    BlueBeBe Member

    Joined:
    Aug 14, 2001
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    301
    Look at this good link:
    http://www.venturesonline.com/docs/whm/logs.htm
     
  6. mina

    mina Active Member

    Joined:
    Mar 3, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    301
    Thank you very much.

    I was a little surprised when I saw that file because it was so huge.
    You two made things clear.
    Yes it is just a log file.

    I setup a logrotate to rotate that file.
    Thank you very much for your help.

    Here's my logrotate conf for stats_log.
    Hope this help someone else having the same problem.

    File: /etc/logrotate.d/cpstats

    /usr/local/cpanel/logs/stats_log {
    missingok
    postrotate
    /usr/local/cpanel/startup 2& /dev/null || true
    endscript
    }
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice