Free space in /opt/zimbra/logs while huge trace log is enabled: Difference between revisions
m (→Resolution) |
|||
Line 12: | Line 12: | ||
'''As Zimbra user''' | '''As Zimbra user''' | ||
crontab -e | crontab -e | ||
# | # Cleanup stack trace | ||
33 10 * * * find /opt/zimbra/log/ -name \*.trace.log -mtime +2 -exec rm -f {} \; > /dev/null 2>&1 | 33 10 * * * find /opt/zimbra/log/ -name \*.trace.log -mtime +2 -exec rm -f {} \; > /dev/null 2>&1 | ||
# | # Cleanup access logs | ||
36 10 * * * find /opt/zimbra/log/ -name access_log.\* -mtime +2 -exec rm -f {} \; > /dev/null 2>&1 | 36 10 * * * find /opt/zimbra/log/ -name access_log.\* -mtime +2 -exec rm -f {} \; > /dev/null 2>&1 | ||
Do not forget to delete these lines if you turn on the regular log level again. | Do not forget to delete these lines if you turn on the regular log level again. |
Latest revision as of 20:02, 19 September 2016
Free space in /opt/zimbra/logs while huge trace log is enabled
- This article is a Work in Progress, and may be unfinished or missing sections.
Purpose
If you enable a deep trace_log, the /opt/zimbra/log partition could be filled quickly, turning into a huge problem for the performance of the system.
Resolution
To deal with huge trace_log files eating up your /opt/zimbra partition, add the next into the Zimbra Crontab. As Zimbra user
crontab -e # Cleanup stack trace 33 10 * * * find /opt/zimbra/log/ -name \*.trace.log -mtime +2 -exec rm -f {} \; > /dev/null 2>&1 # Cleanup access logs 36 10 * * * find /opt/zimbra/log/ -name access_log.\* -mtime +2 -exec rm -f {} \; > /dev/null 2>&1
Do not forget to delete these lines if you turn on the regular log level again.
Additional Content
- Link to a Bugzilla 63661