html tool

2017年7月16日星期日

rsyslogd HUPed repeatedly

https://unix.stackexchange.com/questions/245316/rsyslogd-huped-repeatedly


5down voteaccepted
There's nothing to fix. This is normal operation. When the logfile is rotated by logrotate, it tells rsyslog to close and re-open its logfile file handles by sending it a HUP signal.
If rsyslog doesn't do that, then it will continue to write its log output to the OLD logfiles, not to the new ones because the file handles will still connect to the old files.
This is true even if the old files are deleted (because, on unix, a file isn't truly deleted until the last file handle holding it open is closed)....which is why files don't always release the space they are using up back to the filesystem immediately if some process has an open file handle to them.

没有评论:

发表评论