sync

Enables file syncing capability of omfile.

This parameter applies to omfile: File Output Module.

Name:

sync

Scope:

action

Type:

boolean

Default:

action=off

Required?:

no

Introduced:

at least 5.x, possibly earlier

Description

Enables file syncing capability of omfile.

When enabled, rsyslog does a sync to the data file as well as the directory it resides after processing each batch. There currently is no way to sync only after each n-th batch.

Enabling sync causes a severe performance hit. Actually, it slows omfile so much down, that the probability of loosing messages increases. In short, you should enable syncing only if you know exactly what you do, and fully understand how the rest of the engine works, and have tuned the rest of the engine to lossless operations.

Action usage

action(type="omfile" sync="...")

Notes

  • Legacy documentation referred to the type as binary; this maps to boolean.

Legacy names (for reference)

Historic names/directives for compatibility. Do not use in new configs.

  • $ActionFileEnableSync — maps to sync (status: legacy)

See also

See also omfile: File Output Module.


Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.