[openstack-dev] [devstack] Logging - filling up my tiny SSDs
Ryan Brown
rybrown at redhat.com
Mon Nov 2 20:36:35 UTC 2015
On 11/02/2015 02:22 PM, Sean M. Collins wrote:
> On Mon, Nov 02, 2015 at 03:19:42AM EST, Daniel Mellado wrote:
>> Also you could set up this var
>>
>> LOGDAYS=1
>>
>> to limit the amount of log, althougt setting the LOGDIR to /dev/null
>> should work too.
>
> That is only useful if you are doing a new run of stack.sh - it won't
> handle the issue of the log file growing in size.
>
> I mean I guess the real answer is to configure logrotate. ugh.
Alternatively, you can set up a cronjob to do this:
du -sh LOGDIR | cut -f1 | grep -q G && \
find LOGDIR -type f -exec truncate --size 0 \;
That'll cut all the logfiles down to size when the total size of your
log directory exceeds 1 GB. I have it set to run every 3 hours on my vms.
--
Ryan Brown / Senior Software Engineer, Openstack / Red Hat, Inc.
More information about the OpenStack-dev
mailing list