adm.marcello

Registered
May 10, 2005
3
0
151
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
 

dropby23

Well-Known Member
Jan 16, 2005
155
0
166
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