$InputFilePersistStateInterval lines
equivalent to: “PersistStateInterval”
$InputFilePersistStateInterval 1
PersistStateInterval [lines]
Specifies how often the state file shall be written when processing the input file. The default value is 0,
which means a new state file is only written when the monitored files is being closed (end of rsyslogd execution).
Any other value n means that the state file is written every time n file lines have been processed.
This setting can be used to guard against message duplication due to fatal errors (like power fail). Note that this setting affects imfile performance,
especially when set to a low value. Frequently writing the state file is very time consuming.
指定状态文件应该被写的频度当处理input 文件,默认是0:
这意味着一个新的状态文件只有写当监控的文件是被关闭的(rsyslogd结束)
任何其他值n意味着state 文件是每次处理多少行
这个设置可以用于避免消息重复由于致命错误(像断电).
注意 这个设置影响 imfile性能
尤其是设置为小的值,频繁写状态文件是非常耗时的
PersistStateInterval="1" :