Files are only rotated when they grow larger than the value 300MB
which is set at cpanel >> Tweak >> Log rotation size
threshold, currently set as 300 MB default.
You can have the log rotation checked from under
Main >> Service Configuration >> cPanel Log Rotation Configuration
Inorder to rotate the btmp, chkservd.log and brcm-iscsi.log I have made changes to the logrotate.conf file located in the /etc directory.
/var/log/chkservd.log {
weekly
rotate 1
}
To add insult to injury, cPanel is not rotating its own logs either. Place this in the same file we have been editing:
/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
}
/var/log/xferlog {
weekly
rotate 1
postrotate
}
/var/log/chkservd.log {
weekly
rotate 1
}
/usr/local/cpanel/logs/ cpbackup/*.log {
weekly
rotate 1
}
/usr/local/cpanel/logs/*log {
weekly
rotate 1
}
/usr/local/apache/logs/*log {
daily
rotate 7
sharedscripts
postrotate
}
You can have the log rotation checked from under
Main >> Service Configuration >> cPanel Log Rotation Configuration
Inorder to rotate the btmp, chkservd.log and brcm-iscsi.log I have made changes to the logrotate.conf file located in the /etc directory.
/var/log/chkservd.log {
weekly
rotate 1
}
To add insult to injury, cPanel is not rotating its own logs either. Place this in the same file we have been editing:
/usr/local/cpanel/logs/stats_
weekly
rotate 1
}
/usr/local/cpanel/logs/access_
weekly
rotate 1
}
/usr/local/cpanel/logs/error_
weekly
rotate 1
}
/var/log/xferlog {
weekly
rotate 1
postrotate
/sbin/service pure-ftpd restart > /dev/null 2>/dev/null || true
endscript}
/var/log/chkservd.log {
weekly
rotate 1
}
/usr/local/cpanel/logs/
weekly
rotate 1
}
/usr/local/cpanel/logs/*log {
weekly
rotate 1
}
/usr/local/apache/logs/*log {
daily
rotate 7
sharedscripts
postrotate
/sbin/service httpd graceful > /dev/null 2>/dev/null || true
endscript}
/var/log/btmp { |
|
monthly |
|
minsize 1M |
|
create 0600 root utmp |
|
rotate 1 |
|
} |
No comments:
Post a Comment