how do i prevent the logfiles from getting 2GB of file. what should i set in logrotate?
thanks!
Mark Quitoriano wrote:
how do i prevent the logfiles from getting 2GB of file. what should i set in logrotate?
How often do you rotate the logs today?
Maybe you can do it more often, change "monthly" to "weekly" in /etc/logrotate.conf
man logrotate will tell you how to rotate based on size. If the log file gets to 2G in one day you might need to move the file logrotate from /etc/cron.daily to /etc/cron.hourly
Mogens
Mogens Kjaer wrote:
Mark Quitoriano wrote:
how do i prevent the logfiles from getting 2GB of file. what should i set in logrotate?
How often do you rotate the logs today?
Maybe you can do it more often, change "monthly" to "weekly" in /etc/logrotate.conf
man logrotate will tell you how to rotate based on size. If the log file gets to 2G in one day you might need to move the file logrotate from /etc/cron.daily to /etc/cron.hourly
Mogens
Or move the log for resourcehogd from /var/log/hog.log to /dev/null 2>&1 and forget about rotating the damn thing.
On 6/2/07, Mogens Kjaer mk@crc.dk wrote:
Mark Quitoriano wrote:
how do i prevent the logfiles from getting 2GB of file. what should i set in logrotate?
How often do you rotate the logs today?
Maybe you can do it more often, change "monthly" to "weekly" in /etc/logrotate.conf
man logrotate will tell you how to rotate based on size. If the log file gets to 2G in one day you might need to move the file logrotate from /etc/cron.daily to /etc/cron.hourly
Mogens
-- Mogens Kjaer, Carlsberg A/S, Computer Department Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark Phone: +45 33 27 53 25, Fax: +45 33 27 47 08 Email: mk@crc.dk Homepage: http://www.crc.dk _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
weekly, i just changed it do daily. Is there a way to rotate it by size of file? instead of time?
Mark Quitoriano wrote:
On 6/2/07, Mogens Kjaer mk@crc.dk wrote:
Mark Quitoriano wrote:
how do i prevent the logfiles from getting 2GB of file. what should i set in logrotate?
How often do you rotate the logs today?
Maybe you can do it more often, change "monthly" to "weekly" in /etc/logrotate.conf
man logrotate will tell you how to rotate based on size. If the log file gets to 2G in one day you might need to move the file logrotate from /etc/cron.daily to /etc/cron.hourly
Mogens
-- Mogens Kjaer, Carlsberg A/S, Computer Department Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark Phone: +45 33 27 53 25, Fax: +45 33 27 47 08 Email: mk@crc.dk Homepage: http://www.crc.dk _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
weekly, i just changed it do daily. Is there a way to rotate it by size of file? instead of time?
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
man logrotate.8 ... "/var/log/httpd/access.log" /var/log/httpd/error.log { rotate 5 mail www@my.org size=100k sharedscripts postrotate /sbin/killall -HUP httpd endscript }
...
Hi
On 6/3/07, Bob Marcan bob.marcan@interstudio.homeunix.net wrote:
man logrotate.8 ... "/var/log/httpd/access.log" /var/log/httpd/error.log { rotate 5 mail www@my.org size=100k sharedscripts postrotate /sbin/killall -HUP httpd endscript }
i tried this in my logrotate but still it doesn't rotate by size here's my squid logrotate file
/var/log/squid/access.log { # weekly rotate 5 copytruncate compress notifempty missingok size=1000M postrotate /usr/sbin/squid -k rotate #/sbin/killall -HUP squid endscript
im not sure if i killall -HUP or just run squid -k rotate
thanks!