Dynamically generate Linux MOTD SSH banner
- Should be very fast (no perceived visual latency, even under high load)
- Display relevant system information, and colorize anormal measures in orange if something is suspicious, red if it requires immediate action
- Be reasonably portable across Linux boxes (rsync'ing the binary should work)
- Learn Rust :)
- system load (orange/red if close/above CPU count)
- memory/swap usage
- filesystem usage (orange/red if almost full)
- hardware temperatures (CPU, HDD...) (orange/red if too hot)
- network interface bandwidth
- Systemd units in failed state (red)
You need a Rust build environment for example from rustup.
cargo build --release
install -Dm 755 -t /usr/local/bin target/release/motd
See GitHub releases for Debian packages built for each tagged version.
Arch Linux users can install the motd AUR package.
Configuration is optional, and allows you to exclude for example some filesystems or temperature sensors based on regular expressions.
Example of ~/.config/motd/config.toml
config file:
[fs]
mount_path_blacklist = ["^/dev($|/)", "^/run($|/)"]
mount_type_blacklist = ["^tmpfs$"]
[temp]
hwmon_label_blacklist = ["^CPUTIN$", "^SYSTIN$"]