DINIT-MONITOR(8)
πΈ 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-poption.-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-poption.-i,--initialβ run the specified command additionally for the initial status of the services or environment (so, right whendinit-monitoris started). without this option, the command only fires whenever status changes. kind of a "hey, here's where we're at" bonus π«--str-startedstarted-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-stoppedstopped-text β set the text used for the substitution of the status in the command when a service stops. π΄--str-failedfailed-text β set the text used for the substitution of the status in the command when a service fails to start. π--str-setset-text β set the text used for the substitution of the status in the command when an environment variable is set.--str-unsetunset-text β set the text used for the substitution of the status in the command when an environment variable is unset.--socket-pathsocket-path,-psocket-path β specify the path to the socket used for communicating with the service manager daemon. when you don't specify it, theDINIT_SOCKET_PATHenvironment variable gets read; otherwise Dinit's default values are used. π«Ά
β STATUS REPORT OPTIONS β
--commandcommand,-ccommand β execute the specified command when the service status changes. inside command:%ngets substituted with the service or environment variable name%vgets substituted with the environment variable value%sgets substituted with a textual description of the new status (started,stoppedorfailedfor services,setorunsetfor 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 π
π 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
- alpine 3.24: dinit-doc 0.21.0-r0 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms