Perry Myers
2009-Jan-18 08:03 UTC
[Ovirt-devel] [PATCH node] Bump log rotation so logs can be up to 1MB for standalone mode
10k is a good default size for a completely stateless node, but in standalone mode or when we have local storage available we should use more of it for logs For ovirt-server managed mode, making max log size 1MB won't affect overall memory usage too badly. With ~10 log files, the max disk usage will be about 10MB Also persist ovirt-logrotate.conf file so that changes made in standalone mode will actually be persisted Signed-off-by: Perry Myers <pmyers at redhat.com> --- logrotate/ovirt-logrotate.conf | 4 ++-- scripts/ovirt-config-logging | 2 +- scripts/ovirt-functions | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/logrotate/ovirt-logrotate.conf b/logrotate/ovirt-logrotate.conf index 96fb87c..da4beee 100644 --- a/logrotate/ovirt-logrotate.conf +++ b/logrotate/ovirt-logrotate.conf @@ -1,11 +1,11 @@ /var/log/*.log { rotate 0 missingok - size=10k + size=1024k } /var/log/messages { rotate 0 missingok - size=10k + size=1024k } diff --git a/scripts/ovirt-config-logging b/scripts/ovirt-config-logging index ba91468..3b5b82b 100755 --- a/scripts/ovirt-config-logging +++ b/scripts/ovirt-config-logging @@ -76,7 +76,7 @@ function is_numeric { function prompt_user { while true ; do - max_log_size="10" + max_log_size="1024" syslog_server_ip="" syslog_server_port="" diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions index 13f9ad4..2e62fc4 100644 --- a/scripts/ovirt-functions +++ b/scripts/ovirt-functions @@ -27,7 +27,8 @@ OVIRT_CONFIG_FILES="\ /etc/ssh/ssh_host*_key* \ /etc/default/ovirt \ /etc/sysconfig/network \ - /etc/collectd.conf + /etc/collectd.conf \ + /etc/logrotate.d/ovirt-logrotate.conf " # Save stdout to fd 6 and stderr to fd 7. Redirect normal stdout/stderr -- 1.6.0.6
Alan Pevec
2009-Jan-18 11:35 UTC
[Ovirt-devel] [PATCH node] Bump log rotation so logs can be up to 1MB for standalone mode
ACK -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://listman.redhat.com/archives/ovirt-devel/attachments/20090118/7e91bef5/attachment.htm>
Jim Meyering
2009-Jan-18 12:05 UTC
[Ovirt-devel] [PATCH node] Bump log rotation so logs can be up to 1MB for standalone mode
Perry Myers <pmyers at redhat.com> wrote:> 10k is a good default size for a completely stateless node, but in standalone > mode or when we have local storage available we should use more of it for logs > > For ovirt-server managed mode, making max log size 1MB won't affect overall > memory usage too badly. With ~10 log files, the max disk usage will be about > 10MBACK, w/suggestion> diff --git a/scripts/ovirt-functions b/scripts/ovirt-functions > index 13f9ad4..2e62fc4 100644 > --- a/scripts/ovirt-functions > +++ b/scripts/ovirt-functions > @@ -27,7 +27,8 @@ OVIRT_CONFIG_FILES="\ > /etc/ssh/ssh_host*_key* \ > /etc/default/ovirt \ > /etc/sysconfig/network \ > - /etc/collectd.conf > + /etc/collectd.conf \ > + /etc/logrotate.d/ovirt-logrotate.confAs someone who recently made the mistake of omitting backslashes in a list just like that (it was in a libvirt Makefile), I feel obliged to suggest aligning them. Then it's harder for people like me to make the mistake ;-) /etc/ssh/ssh_host*_key* \ /etc/default/ovirt \ /etc/sysconfig/network \ /etc/collectd.conf \ /etc/logrotate.d/ovirt-logrotate.conf