I am writing a python daemon for a RHEL VM. I want to check some logs in /var/log/messages every 5 mins and move them to another log location if they match certain criteria. While my custom python daemon runs, i lock /var/log/messages using fcntl.

I want to ask; while my python daemon is running and rsyslog wants to write some logs in messages, will rsyslog wait for the messages to get unlocked or just discard the log? Also will rsyslog crash as it is expecting the /var/log/messages to be always available to write.

I wrote the python script and run it as a daemon. So far i haven't had the condition where rsyslog and my custom daemon open the /var/log/messages at the same time. Will rsyslog crash if the python script is using the file?

0

There are 0 answers