Validate rsyslog configuration syntax without starting the daemon normally.
Which command is representative?
rsyslogd -N1 validates configuration and exits, making it useful before restart.
Detailed explanation
rsyslogd -HIncorrect. -H is not the standard validation mode.
Incorrect. -H is not the standard validation mode.
rsyslogd -N1Correct. -N1 performs a configuration check.
Correct. -N1 performs a configuration check.
logger -N1Incorrect. logger sends a message and does not parse the config.
Incorrect. logger sends a message and does not parse the config.
journalctl --verify /etc/rsyslog.confIncorrect. journalctl verification applies to journal files, not rsyslog.conf.
Incorrect. journalctl verification applies to journal files, not rsyslog.conf.
Try it yourself
An example you can run in a temporary verification environment.
rsyslogd -v 2>&1 | head -n 1Expected result
rsyslogdのversion行(導入環境)Key points
- -N1 validation
- No normal daemon start
- Check before restart
Notes
- Environment: rsyslogd version/helpの読取のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.