我正在使用日志轮换,但不知何故,日志在90天后没有被清除,这是我的aerospike的配置。此外,日志也呈指数级增长。
log-rotate的配置:
/var/log/aerospike/aerospike.log {
daily
rotate 90
dateext
compress
olddir /var/log/aerospike/
postrotate
kill -HUP `cat /var/run/aerospike/asd.pid`
endscript }aerospike的配置:
logging {
file /var/log/aerospike/aerospike.log {
context any info
context migrate debug
}
}发布于 2017-11-09 00:09:03
默认情况下,在使用sysV的发行版上,Aerospike附带logrotate脚本。
在默认使用systemd的发行版上,假设您将使用journald,因此logrotate脚本不是包的一部分。
可以在以下位置找到附带的logrotate脚本:
发布于 2017-11-10 09:38:02
另请参阅来自Aerospike页面的日志轮换配置指南:
https://www.aerospike.com/docs/operations/configure/log/logrotate.html
并尝试使用verbose标志手动运行logrotate以查看任何错误消息。
sudo logrotate -f -v /etc/logrotate.d/aerospikerotate指令应在配置中的90天后清除:
/var/log/aerospike/aerospike.log {
daily
rotate 90
dateext
compress
olddir /var/log/aerospike/
postrotate
/bin/kill -HUP `pidof asd`
endscript
}另请检查状态文件以获取更多信息:
cat /var/lib/logrotate.statushttps://stackoverflow.com/questions/47175430
复制相似问题