User Tools

Site Tools


evergreen-admin:maintenance:logs

Administering Evergreen Logs

Particularly if you have set debugging to a highly verbose level, like INFO or DEBUG, the Evergreen logs can quickly take up a significant amount of disk space. Fortunately, this is not a new problem for Unix administrators, and there are a number of ways of keeping your logs under control. On Debian and Ubuntu, for example, the logrotate utility controls when old log files are compressed and a new log file is started. logrotate runs once a day and checks all log files that it knows about to see if a threshold of time or size has been reached and rotates the log files if a threshold condition has been met.

To teach logrotate to rotate Evergreen logs on a weekly basis, or if they are > 50MB in size, create a new file /etc/logrotate.d/evergreen with the following contents:

compress
/openils/var/log/*.log {
  # keep the last 4 archived log files along with the current log file
  #   log log.1.gz log.2.gz log.3.gz log.4.gz
  # and delete the oldest log file (what would have been log.5.gz)
  rotate 5

  # if the log file is > 50MB in size, rotate it immediately
  size 50M

  # for those logs that don't grow fast, rotate them weekly anyway
  weekly
}
evergreen-admin/maintenance/logs.txt · Last modified: 2022/02/10 13:34 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

© 2008-2022 GPLS and others. Evergreen is open source software, freely licensed under GNU GPLv2 or later.
The Evergreen Project is a U.S. 501(c)3 non-profit organization.