/var/log/myapp.log { rotate 7 size 500M compress weekly postrotate /bin/kill -HUP `cat /var/run/myapp.pID 2>/dev/null` 2>/dev/null || true endscript}
压缩发生在后旋后(已经是反直觉的)了吗?
如果没有任何人可以告诉我,如果可以这样做没有额外的命令脚本(一个选项或一些技巧)?
谢谢
托马斯
The next section of the config files defined how to handle the log file
/var/log/messages. The log will go through five weekly rotations before
being removed. After the log file has been rotated (but before the old
version of the log has been compressed),the command /sbin/killall -HUP
syslogd will be executed.
无论如何,您可以使用delaycompress选项将压缩推迟到下一轮.
总结以上是内存溢出为你收集整理的postrotate脚本后的linux – logrotate压缩文件全部内容,希望文章能够帮你解决postrotate脚本后的linux – logrotate压缩文件所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)