rsyslogd Command Generator
Generate rsyslogd commands to start the rsyslog daemon with optional config, pidfile, or debug mode
Getting Started with rsyslogd
## What is rsyslogd?
`rsyslogd` is the system and kernel logging daemon shipped with most modern Linux distributions. It reads messages from `/dev/log`, the kernel ring buffer, and network sources, then routes them to files, remote servers, or databases according to rules in `/etc/rsyslog.conf` and `/etc/rsyslog.d/*.conf`.
## How to Use
1. **Choose how to run it**: usually via `systemctl restart rsyslog`, but the bare binary is useful for testing a custom config. 2. **Pick options**: `-f config` to use a non-default config file, `-i pidfile`, `-n` (no-fork/foreground), `-d` (debug), `-v` (version). 3. **Copy & Run**: Prefix with `sudo`. In production prefer `systemctl` so the service manager tracks the daemon.
Common Options
### `-f CONFIG` Alternate config Load a different rules file instead of the default `/etc/rsyslog.conf`: `rsyslogd -f /tmp/test-rsyslog.conf`. Useful for validating changes before deploying.
### `-i PIDFILE` Custom pid file Write the daemon's PID to a non-default location: `rsyslogd -i /var/run/my-rsyslog.pid`.
### `-n` No-fork (foreground) Stay attached to the terminal instead of forking into the background. Pair with `-d` for live debugging, or run under a supervisor like systemd or docker.
### `-d` Debug mode Print verbose diagnostic output about rule parsing, module loading, and message routing. Combined with `-n` it lets you watch every decision in real time.
### `-v` Version Print the rsyslog version and exit — useful for confirming which feature modules are available before writing config.
### Combining flags For interactive debugging, run `sudo rsyslogd -n -d -f /etc/rsyslog.conf`: `-n` keeps it in the foreground, `-d` streams every parsing and routing decision, and `-f` lets you point at a test config. Stop it with Ctrl-C; the production instance under systemd is untouched.
▶How do I edit rsyslog rules without breaking logging?
▶Why use systemctl instead of running rsyslogd directly?
▶How do I forward logs to a remote server?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee