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.

problems with processing log files

Discussion in 'General Discussion' started by adm.marcello, Feb 7, 2006.

  1. adm.marcello

    adm.marcello Registered

    Joined:
    May 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    hello,
    i have a server that was crashing every day with a big log stats (from only one domain). so i changed the option
    Number of days between processing log files and bandwidth usage (default 1, decimal values are ok): from 1 to 0.125.

    But i think when i was verifying the result of daily statiscs of webalizer the shown result is divided by 8.

    My question:
    the result that is shown is only the last, or all results are recorded in some other file, and all files are processed after to make the stastistics of a day??

    I'm running under Cent OS 3.5
    WHM 10.8.0 cPanel 10.8.1-S31
    i've marked the option of delete each domain's access logs after stats run
     
  2. adm.marcello

    adm.marcello Registered

    Joined:
    May 10, 2005
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    some reply?
    I didn't made myself clear?

    Thanks in advance.
     
  3. dropby23

    dropby23 Well-Known Member

    Joined:
    Jan 16, 2005
    Messages:
    155
    Likes Received:
    0
    Trophy Points:
    16
    if you are talking about httpd logs

    you must add theselines to your
    /etc/logrotate.d directory
    make a file called httpd and put these lines to that file
    Code:
    /usr/local/apache/logs/*log {
        missingok
        notifempty
        sharedscripts
        postrotate
            /bin/kill -HUP `cat /usr/local/apache/logs/httpd.pid 2>/dev/null` 2> /dev/null || true
        endscript
    }
    
    this is missing in centos
    and also in /etc/logrotate.conf add these lines at the end of the file

    Code:
    /var/log/chkservd.log {
    weekly
    rotate 1
    }
    
    /usr/local/cpanel/logs/stats_log {
    weekly
    rotate 1
    }
    
    /usr/local/cpanel/logs/access_log {
    weekly
    rotate 1
    }
    
    /usr/local/cpanel/logs/error_log {
    weekly
    rotate 1
    }
    
    than rotate the logs

    /usr/sbin/logrotate -vf /etc/logrotate.conf

    if you are talking about domlogs just do
    /scripts/runweblogs
     
Loading...

Share This Page