logadm(8) on Solnix vs Linux and the BSDs
logadm is the illumos log rotation tool at /usr/sbin/logadm. It reads /etc/logadm.conf, where each line is a log name followed by logadm command-line options. Linux logrotate and the BSD newsyslog use different configuration models, and none of them share logadm's option letters.
The manual pages
- Solnix: logadm(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: logrotate(8) logrotate-3.22.0 (different command, similar job)
- FreeBSD: newsyslog(8) 15.1-RELEASE (different command, similar job)
- OpenBSD: newsyslog(8) 8.0 (different command, similar job)
- NetBSD: newsyslog(8) 11.0 (different command, similar job)
What Solnix runs
A default Solnix system runs the illumos logadm at /usr/sbin/logadm. No other variants are shipped. The counterparts are different programs with similar purposes: logrotate on Linux, newsyslog on FreeBSD, OpenBSD and NetBSD. The bundle's Solnix text is trimmed after -N/-o, so options such as -p, -s, -t, -z and -P are described here only where the visible text covers them.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD, OpenBSD, NetBSD | configuration file format | Solnix /etc/logadm.conf lines are 'logname options', where options are written exactly as on the command line. The BSD /etc/newsyslog.conf uses positional fields: logfile_name, owner:group, mode, count, size, when, then flags.Source: Solnix logadm(8) DESCRIPTION (/etc/logadm.conf lines of the form logname options); OpenBSD newsyslog(8) config fields; NetBSD newsyslog(8) config fields |
| Linux | configuration model | logrotate takes one or more config files as arguments, can read a whole directory, and uses an include directive. logadm reads /etc/logadm.conf when run with no arguments, and -f conf_file selects another file.Source: Linux logrotate(8) DESCRIPTION (config files, include directive); Solnix logadm(8) DESCRIPTION, -f |
| Linux | no-argument behaviour | With no arguments, logadm processes every entry in /etc/logadm.conf. With no arguments, logrotate only prints version, copyright and a usage summary and rotates nothing.Source: Solnix logadm(8) DESCRIPTION; Linux logrotate(8) DESCRIPTION |
| all four | forcing a rotation | On Solnix, -p now forces a rotation. The Solnix option list has no -F or -f force flag, and -f means 'use this config file'. logrotate uses -f/--force. newsyslog uses -F; FreeBSD -R tagname forces named files only.Source: Solnix logadm(8) DESCRIPTION (-p now), -f; Linux logrotate(8) -f; FreeBSD newsyslog(8) -F, -R; OpenBSD newsyslog(8) -F; NetBSD newsyslog(8) SYNOPSIS |
| all four | dry run | Solnix logadm -n prints the actions without performing them. logrotate -d/--debug changes nothing and does not update the state file. newsyslog -n does the same as logadm -n; on FreeBSD it also implies -r.Source: Solnix logadm(8) -n; Linux logrotate(8) -d; FreeBSD newsyslog(8) -n; OpenBSD newsyslog(8) -n |
| FreeBSD, OpenBSD, NetBSD | default rotation and retention | With no -s or -p, logadm rotates when the log is non-zero in size and at least one week has passed (-s 1b -p 1w). It keeps ten old logs (-C 10). The BSDs have no such defaults; size, interval and count are config-file fields.Source: Solnix logadm(8) DESCRIPTION, -C; OpenBSD newsyslog(8) count, size, when fields |
| FreeBSD, OpenBSD, NetBSD | combining size and time conditions | Solnix: -s and -p combine with an implied AND, so all must be met. OpenBSD: with a size plus a time or interval, rotation happens if either is reached. When both time and interval are given, OpenBSD requires both and NetBSD requires either.Source: Solnix logadm(8) DESCRIPTION (implied and); OpenBSD newsyslog(8) when field; NetBSD newsyslog(8) when field |
| FreeBSD, OpenBSD, NetBSD | daemon restart | logadm runs the shell commands given with -b before and -a after the rename, once per invocation and not once per log. The newsyslog pages describe signalling syslogd(8) (FreeBSD -S pidfile, -s to skip), and the Solnix page shows no such signalling.Source: Solnix logadm(8) -a, -b; FreeBSD newsyslog(8) -r, -s, -S; OpenBSD newsyslog(8) -r |
| FreeBSD, OpenBSD, NetBSD | copy-and-truncate and expiry hooks | logadm -c copies and truncates instead of renaming, and -E cmd runs a command, with $file expanded, to expire an old log instead of deleting it. The visible BSD newsyslog texts show no matching options.Source: Solnix logadm(8) -c, -E; FreeBSD newsyslog(8) OPTIONS; OpenBSD newsyslog(8) options; NetBSD newsyslog(8) SYNOPSIS |
| FreeBSD, OpenBSD, NetBSD | running as non-root | logadm -f lets non-root users keep their own configuration file. newsyslog -r removes the root-only restriction, and the FreeBSD and OpenBSD pages say it then cannot signal syslogd.Source: Solnix logadm(8) -f; FreeBSD newsyslog(8) -r; OpenBSD newsyslog(8) -r |
| OpenBSD | logs named on the command line | On OpenBSD each log named on the command line must have an entry in /etc/newsyslog.conf. The visible Solnix text says logname may be an entry name or a fully qualified pathname, and does not say an entry is required.Source: OpenBSD newsyslog(8) DESCRIPTION; Solnix logadm(8) DESCRIPTION (logname) |
| Linux | state file and locking | logrotate records state in /var/lib/logrotate.status by default and locks it, exiting 3 if the lock cannot be taken. The visible Solnix text does not name a state file or exit codes.Source: Linux logrotate(8) -s, --skip-state-lock; Solnix logadm(8) (visible text) |
Everyday tasks
| Task | Solnix | Linux | FreeBSD | OpenBSD | NetBSD |
|---|---|---|---|---|---|
| process all configured logs | logadm | logrotate config_file | newsyslog | newsyslog | newsyslog |
| use an alternate config file | logadm -f conf_file | logrotate config_file | newsyslog -f config_file | newsyslog -f config_file | newsyslog -f config_file |
| dry run | logadm -n | logrotate -d | newsyslog -n | newsyslog -n | newsyslog -n |
| force rotation | logadm -p now logname | logrotate -f config_file | newsyslog -F | newsyslog -F | newsyslog -F |
| rotate only named logs | logadm logname | — | newsyslog -R tagname file | newsyslog log | newsyslog file |
| keep no more than N old logs | logadm -C count | — | count field in newsyslog.conf | count field in newsyslog.conf | ngen field in newsyslog.conf |
Standards
- POSIX: logadm is not a POSIX.1-2024 utility.
- Solnix: The visible Solnix text states no standard or interface stability level.
Writing portable scripts
- Do not share rotation config between systems. logadm.conf, logrotate config and newsyslog.conf use three different formats, so generate each from one source or maintain them separately.
- Test with the dry-run flag for each tool before scheduling it: logadm
-n, logrotate-d, newsyslog-n.
Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.