dinit-monitor.8.m4 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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. .TP
  35. \fB\-E\fR, \fB\-\-env\fR
  36. Instead of monitoring the services, monitor changes in the global environment.
  37. If no environment variables are passed, all environment is monitored.
  38. .TP
  39. \fB\-s\fR, \fB\-\-system\fR
  40. Control the system init process (this is the default when run as root).
  41. This option determines the default path to the control socket used to communicate with the \fBdinit\fR daemon
  42. process (it does not override the \fB\-p\fR option).
  43. .TP
  44. \fB\-u\fR, \fB\-\-user\fR
  45. Control the user init process (this is the default when not run as root).
  46. This option determines the default path to the control socket used to communicate with the \fBdinit\fR daemon process
  47. (it does not override the \fB\-p\fR option).
  48. .TP
  49. \fB\-i\fR, \fB\-\-initial\fR
  50. Issue the specified command additionally for the initial status of the services or environment (when \fBdinit\-monitor\fR is started).
  51. Without this option, the command is only executed whenever status changes.
  52. .TP
  53. \fB\-\-str\-started\fR \fIstarted-text\fR
  54. Specify the text used for the substitution of the status in the command (as specified
  55. by the \fB\-\-command\fR option) when a service starts.
  56. .TP
  57. \fB\-\-str\-stopped\fR \fIstopped-text\fR
  58. Specify the text used for the substitution of the status in the command (as specified
  59. by the \fB\-\-command\fR option) when a service stops.
  60. .TP
  61. \fB\-\-str\-failed\fR \fIfailed-text\fR
  62. Specify the text used for the substitution of the status in the command (as specified
  63. by the \fB\-\-command\fR option) when a service fails to start.
  64. .TP
  65. \fB\-\-str\-set\fR \fIset-text\fR
  66. Specify the text used for the substitution of the status in the command (as specified
  67. by the \fB\-\-command\fR option) when an environment variable is set.
  68. .TP
  69. \fB\-\-str\-unset\fR \fIunset-text\fR
  70. Specify the text used for the substitution of the status in the command (as specified
  71. by the \fB\-\-command\fR option) when an environment variable is unset.
  72. .TP
  73. \fB\-\-socket\-path\fR \fIsocket-path\fR, \fB\-p\fR \fIsocket-path\fR
  74. Specify the path to the socket used for communicating with the service manager daemon.
  75. When not specified, the \fIDINIT_SOCKET_PATH\fR environment variable is read, otherwise
  76. Dinit's default values are used.
  77. .\"
  78. .SH STATUS REPORT OPTIONS
  79. .TP
  80. \fB\-\-command\fR \fIcommand\fR, \fB\-c\fR \fIcommand\fR
  81. Execute the specified \fIcommand\fR when the service status changes.
  82. In \fIcommand\fR, \fB%n\fR will be substituted with the service or environment variable name,
  83. \fB%v\fR will be substituted with the environment variable value, and \fB%s\fR will be substituted
  84. with a textual description of the new status (\fBstarted\fR, \fBstopped\fR or \fBfailed\fR for
  85. services, \fBset\fR or \fBunset\fR for environment variables). A double percent sign
  86. (\fB%%\fR) is substituted with a single percent sign character.
  87. .\"
  88. .SH OPERATION
  89. .\"
  90. The \fBdinit-monitor\fR program will wait until a monitored service changes status, and execute
  91. the notification command. When execution of the notification command completes, dinit-monitor will
  92. resume monitoring of service status.
  93. .LP
  94. The monitoring provided by \fBdinit-monitor\fR is not intended to be used for system-critical
  95. purposes. If system load is particularly high, for example, notifications may be skipped.
  96. .\"
  97. .SH SEE ALSO
  98. \fBdinit\fR(8), \fBdinitctl\fR(8).
  99. .\"
  100. .SH AUTHOR
  101. Dinit, and this manual, were written by Davin McCall.
  102. $$$dnl