LogPath¶
Specifies the kernel log device or file that imklog reads.
This parameter applies to imklog: Kernel Log Input Module.
- Name:
LogPath
- Scope:
module
- Type:
word
- Default:
Linux: “/proc/kmsg”; other platforms: “/dev/klog”
- Required?:
no
- Introduced:
at least 5.x, possibly earlier
Description¶
Defines the path to the kernel log device or file that imklog reads from. If this parameter is not set, it defaults to “/proc/kmsg” on Linux and “/dev/klog” on other platforms.
The kernel log devices block until new messages arrive. If the configured path is something else, for example a regular file or a FIFO whose writer has closed it, reading can report end of file. In that case imklog logs a warning once and then checks for new data once per second.
If reading fails with a non-retryable error, imklog logs the error, closes
the path and stops reading until rsyslogd is restarted. With
global(inputStartupPolicy="require-all"), rsyslogd terminates in this
case.
Module usage¶
module(load="imklog" logPath="/dev/klog")
Legacy names (for reference)¶
Historic names/directives for compatibility. Do not use in new configs.
$klogpath — maps to LogPath (status: legacy)
See also¶
imklog: Kernel Log Input Module
Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project
Contributing: Source & docs: rsyslog source project
© 2008–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.