Am 19.01.2022 um 13:21 schrieb Mariusz Kruk via rsyslog:
On 19.01.2022 13:10, Helmut Schneider via rsyslog wrote:
Am 19.01.2022 um 12:11 schrieb Mariusz Kruk via rsyslog:
It's not exactly clear what you mean :-)
[...]
3. logrotate sends SIGHUP to rsyslogd as part of postrotate action

If logrotate rotes a log, do I always have to reload rsyslod or only under some circumstances?

Well,  you never "have to" ;-)

But seriously. As I wrote before - when you rotate the file, logrotate
does a simple syscall changing the link in the directory index but the
file itself (inode, contents) stays the same. And if it's open at time
of rotating the descriptors stay open and the processes that have the
file open still work on the file they had opened at the moment of
rotation. But if any process wants to open the file by the old name - it
won't find it because file _under that name_ is no longer present in the
directory. So if "old" process doesn't close/re-open the file, it will
still be writing to the old file under a new name when newly created
processes (or old processes which open the file later) will refer to a
new file.

Sounds to me like "killall -HUP rsyslogd" is recommended on each run of logrotate, correct? At least it doesn't hurt. :)

_______________________________________________
rsyslog mailing list
https://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of 
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE 
THAT.

Reply via email to