--- name: triage-a-failed-service description: Find out why an SMF service is offline or in maintenance on Solnix and get it running. Use when a service is down. --- # Triage a failed service 1. **Ask SMF.** `svcs -xv` (or `svcs -xv `). Done when you have the FMRI, its state, the reason line and the log path. 2. **Read the log.** `tail -50 ` (the path from step 1; `svcs -l ` shows it as `logfile`). Done when you can quote the error line. 3. **Check dependencies.** `svcs -d `: a dependency not online explains an `offline` service. Done when every dependency is online or you have found the one that is not (then start at step 1 for it). 4. **Fix the cause in the configuration** (the service's `smf.services` entry or its config file in the Nix configuration), then `pfexec solnix-rebuild test`. 5. **Clear maintenance.** `pfexec svcadm clear `. Done when `svcs ` shows `online` and `svcs -x` prints nothing for it. Rule: `solnix/rules/smf-diagnose-failures.md`.