Logwatch file lock

Started by yashii, April 23, 2018, 02:55:22 PM

Previous topic - Next topic

yashii

On a Windows system, I'm executing an external script through the nxagent that writes to a .txt file.
This file is monitored for changes by the logwatch subagent.

When the external script tries to write to that .txt file, the script's own log shows that the file is locked by the nxagent.
Is there any way to keep the agent from permanently locking the file?

Victor Kirhenshtein

Hi,

agent opens file being monitored with "shared for write" access. However, if application that writes to the file attempts to open it without specifying "shared for read" option it will get file open error. In upcoming 2.2.5 release we have added log parser option "keepOpen" that can be set to false to instruct parser to re-open file every time to get new records.

Best regards,
Victor

Spheron

Hi Victor,

does this option also apply to access to the Windows event log?

Greets
Marco



Victor Kirhenshtein

Hi,

no, it's irrelevant for Windows Event Log. Agent uses appropriate Windows API to access events in event log.

Best regards,
Victor

Spheron


I asked because I still had the same problems with the agent update from V2.2.3 to V2.2.4 that I had described here

https://www.netxms.org/forum/installation/install-agent-2-2-1-fails/


Maybe i had same Problem at Agent Update as the user who has opened this Thread:

https://www.netxms.org/forum/installation/upgrading-agents/


Greets
Marco