2
0

dinit-monitor.8.m4 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. changequote(`@@@',`$$$')dnl
  2. @@@.TH DINIT\-MONITOR "8" "$$$MONTH YEAR@@@" "Dinit $$$VERSION@@@" "Dinit \- service management system"
  3. .SH NAME
  4. dinit\-monitor \- monitor services or environment supervised by Dinit
  5. .\"
  6. .SH SYNOPSIS
  7. .\"
  8. .PD 0
  9. .nh
  10. .HP
  11. .B dinit-monitor
  12. [\fIoptions\fR] {\fB\-c\fR \fIcommand\fR, \fB\-\-command\fR \fIcommand\fR} \fIservice-or-env\fR [\fIservice-or-env\fR...]
  13. .\"
  14. .PD
  15. .hy
  16. .\"
  17. .SH DESCRIPTION
  18. .\"
  19. \fBdinit\-monitor\fR is a utility to monitor the state of one or more services or environment managed by the \fBdinit\fR daemon.
  20. Changes in service or environment state are reported by the execution of the specified command.
  21. When monitoring environment, positional arguments are not required (all environment will be monitored).
  22. By default, service events are monitored.
  23. .\"
  24. .SH GENERAL OPTIONS
  25. .TP
  26. \fB\-\-help\fR
  27. Display brief help text and then exit.
  28. .TP
  29. \fB\-\-version\fR
  30. Display version and then exit.
  31. .TP
  32. \fB\-e\fR, \fB\-\-exit\fR
  33. Exit after the first command is executed, instead of waiting for more events.
  34. \fB\-E\fR, \fB\-\-env\fR
  35. Instead of monitoring the services, monitor changes in the global environment.
  36. If no environment variables are passed, all environment is monitored.
  37. \fB\-s\fR, \fB\-\-system\fR
  38. Control the system init process (this is the default when run as root).
  39. This option determines the default path to the control socket used to communicate with the \fBdinit\fR daemon
  40. process (it does not override the \fB\-p\fR option).
  41. .TP
  42. \fB\-u\fR, \fB\-\-user\fR
  43. Control the user init process (this is the default when not run as root).
  44. This option determines the default path to the control socket used to communicate with the \fBdinit\fR daemon process
  45. (it does not override the \fB\-p\fR option).
  46. .TP
  47. \fB\-i\fR, \fB\-\-initial\fR
  48. Issue the specified command additionally for the initial status of the services or environment (when \fBdinit\-monitor\fR is started).
  49. Without this option, the command is only executed whenever status changes.
  50. .TP
  51. \fB\-\-str\-started\fR \fIstarted-text\fR
  52. Specify the text used for the substitution of the status in the command (as specified
  53. by the \fB\-\-command\fR option) when a service starts.
  54. .TP
  55. \fB\-\-str\-stopped\fR \fIstopped-text\fR
  56. Specify the text used for the substitution of the status in the command (as specified
  57. by the \fB\-\-command\fR option) when a service stops.
  58. .TP
  59. \fB\-\-str\-failed\fR \fIfailed-text\fR
  60. Specify the text used for the substitution of the status in the command (as specified
  61. by the \fB\-\-command\fR option) when a service fails to start.
  62. .TP
  63. \fB\-\-str\-set\fR \fIset-text\fR
  64. Specify the text used for the substitution of the status in the command (as specified
  65. by the \fB\-\-command\fR option) when an environment variable is set.
  66. .TP
  67. \fB\-\-str\-unset\fR \fIunset-text\fR
  68. Specify the text used for the substitution of the status in the command (as specified
  69. by the \fB\-\-command\fR option) when an environment variable is unset.
  70. .TP
  71. \fB\-\-socket\-path\fR \fIsocket-path\fR, \fB\-p\fR \fIsocket-path\fR
  72. Specify the path to the socket used for communicating with the service manager daemon.
  73. When not specified, the \fIDINIT_SOCKET_PATH\fR environment variable is read, otherwise
  74. Dinit's default values are used.
  75. .\"
  76. .SH STATUS REPORT OPTIONS
  77. .TP
  78. \fB\-\-command\fR \fIcommand\fR, \fB\-c\fR \fIcommand\fR
  79. Execute the specified \fIcommand\fR when the service status changes.
  80. In \fIcommand\fR, \fB%n\fR will be substituted with the service or environment variable name,
  81. \fB%v\fR will be substituted with the environment variable value, and \fB%s\fR will be substituted
  82. with a textual description of the new status (\fBstarted\fR, \fBstopped\fR or \fBfailed\fR for
  83. services, \fBset\fR or \fBunset\fR for environment variables). A double percent sign
  84. (\fB%%\fR) is substituted with a single percent sign character.
  85. .\"
  86. .SH OPERATION
  87. .\"
  88. The \fBdinit-monitor\fR program will wait until a monitored service changes status, and execute
  89. the notification command. When execution of the notification command completes, dinit-monitor will
  90. resume monitoring of service status.
  91. .LP
  92. The monitoring provided by \fBdinit-monitor\fR is not intended to be used for system-critical
  93. purposes. If system load is particularly high, for example, notifications may be skipped.
  94. .\"
  95. .SH SEE ALSO
  96. \fBdinit\fR(8), \fBdinitctl\fR(8).
  97. .\"
  98. .SH AUTHOR
  99. Dinit, and this manual, were written by Davin McCall.
  100. $$$dnl