We have moved at community.getvera.com

Author Topic: Logrotate improvement  (Read 3612 times)

Offline denix

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1088
  • Karma: +1/-0
Logrotate improvement
« on: December 15, 2008, 06:22:54 pm »
Looking into how Vera handles logs, I noticed that they are rotated only based on time - 10 (?) minutes per file, 10 files max.

As a confirmation to that, I've seen MCV requesting people to call/IM within couple hours of failure to be able to catch it in the logs.

Sometimes it's helpful to see old logs, but couple hours window is not too much when you debug something.

There are few ways to improve it. Besides normal rotation by size (let's say logs are only rotated when the file reaches 100KB), it is also common to avoid rotating empty logs. So, if there was no activity for hours, last log file will be empty and you'd still have some logs saved from the last activity.

I guess if sources were available, I could have looked into fixing this myself...
Veras (1, 2, 3, Lite, Plus), lots of different Z-Wave modules, Luup plugins and theater/security integration.

Offline micasaverde

  • Hero Member
  • *****
  • Posts: 1666
  • Karma: +15/-1
Re: Logrotate improvement
« Reply #1 on: December 16, 2008, 05:18:33 pm »
Actually the source is on Vera itself.  It's not compiled code: /usr/bin/Rotate_Logs.sh

I made a bug report so we'll be sure to take into account your suggestions: http://bugs.micasaverde.com/view.php?id=337