DINIT-MONITOR(8)

πŸ“¦
version 0.21.0 Β· 3 versions
, in alpine 3.24

🌸 DINIT-MONITOR(8) 🌸

okay so bestie, this is the manual page for dinit-monitor, part of the Dinit service management system, and honestly? it's giving "loyal little sidekick" energy. let's get into it πŸ’…


✨ NAME ✨

dinit-monitor β€” monitor services or environment supervised by Dinit


πŸŽ€ SYNOPSIS πŸŽ€

dinit-monitor [options] {-c command, --command command} service-or-env
       [service-or-env...]

πŸ’– DESCRIPTION πŸ’–

dinit-monitor is a utility that literally just sits there and watches the state of one or more services or environment managed by the dinit daemon. πŸ‘€ when a service or environment state changes, it reports that by running the command you told it to run. no cap.

when you're monitoring environment, the positional arguments aren't required β€” that means all environment gets monitored. πŸ¦‹ by default though, it's service events you're monitoring.


🌈 GENERAL OPTIONS 🌈

  • --help β€” shows a brief help text and then dips out. bye ✌️
  • --version β€” shows the version and then exits.
  • -e, --exit β€” exit after the first command is executed, instead of hanging around waiting for more events. one and done, iconic.
  • -E, --env β€” instead of monitoring the services, monitor changes in the global environment. if no environment variables are passed, the whole environment gets monitored. 🌍
  • -s, --system β€” control the system init process (this is the default when you run as root). this option decides the default path to the control socket used to communicate with the dinit daemon process β€” and important, it does not override the -p option.
  • -u, --user β€” control the user init process (this is the default when you're not run as root). this option decides the default path to the control socket used to communicate with the dinit daemon process β€” and again, it does not override the -p option.
  • -i, --initial β€” run the specified command additionally for the initial status of the services or environment (so, right when dinit-monitor is started). without this option, the command only fires whenever status changes. kind of a "hey, here's where we're at" bonus πŸ’«
  • --str-started started-text β€” set the text used for the substitution of the status in the command (the one you gave with --command) when a service starts. 🟒
  • --str-stopped stopped-text β€” set the text used for the substitution of the status in the command when a service stops. πŸ”΄
  • --str-failed failed-text β€” set the text used for the substitution of the status in the command when a service fails to start. πŸ’€
  • --str-set set-text β€” set the text used for the substitution of the status in the command when an environment variable is set.
  • --str-unset unset-text β€” set the text used for the substitution of the status in the command when an environment variable is unset.
  • --socket-path socket-path, -p socket-path β€” specify the path to the socket used for communicating with the service manager daemon. when you don't specify it, the DINIT_SOCKET_PATH environment variable gets read; otherwise Dinit's default values are used. 🫢

⭐ STATUS REPORT OPTIONS ⭐

  • --command command, -c command β€” execute the specified command when the service status changes. inside command:
    • %n gets substituted with the service or environment variable name
    • %v gets substituted with the environment variable value
    • %s gets substituted with a textual description of the new status (started, stopped or failed for services, set or unset for environment variables)

and a double percent sign (%%) gets substituted with a single percent sign character. iykyk, escaping is real πŸ’…


πŸ¦‹ OPERATION πŸ¦‹

the dinit-monitor program waits until a monitored service changes status, then executes the notification command. once the notification command finishes, dinit-monitor goes right back to monitoring service status. it's a whole loop, main character energy honestly.

⚠️ okay listen β€” the monitoring that dinit-monitor provides is not intended for system-critical purposes. if system load is particularly high, for example, notifications may be skipped. so like… don't build your whole life support system on it, bestie. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

dinit(8), dinitctl(8).


πŸ“ AUTHOR πŸ“

Dinit, and this manual, were written by Davin McCall. ty for your service king 🫑


✨ this has been Dinit 0.21.0, from March 2026 β€” slay, go monitor something, and remember: the vibe check is ongoing πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from