cluster monitoring daemon
daemon monitors a resource
(process, FS, etc) on several nodes. The resource can be active only on one
machine. This machine is called primary.
There is one main
daemon which starts
new worker process as soon as a role for the given resource is changed to
primary or watchdog or as soon as a role for the given resource is changed to
secondary and remote (primary) node will successfully connect to it. Every
worker process gets a new process title (see
which describes its role and resource it controls. The exact format is:
hastmon: <resource name> (<role>)
The connection between two
initiated from the one running as primary to the one running as secondary.
is unable to connect
or connection fails, it will try to re-establish connection every few seconds.
On start the
daemon does not pick its
role up automatically. The role has to be configured with the
control utility. Secondary can switch its role to primary if the following
conditions are meat: there is no connection from primary and there are
complaints from watchdog.
daemon can be started with the
following command line arguments:
- Specify alternative location of the configuration file. The default
- Print or log debugging information. This option can be specified multiple
times to raise the verbosity level.
- Start the
hastmon daemon in the
foreground. By default
in the background.
- Print the
hastmon usage message.
- Specify alternative location of a file where main process PID will be
stored. The default location is
- The configuration file for
- Control socket used by the
control utility to communicate with
- The default location of the
Exit status is 0 on success, or one of the values described in
on both nodes and start
watchdog on third node. Set role for resource
to primary on
and to secondary on
nodeB# hastmonctl role secondary shared
nodeA# hastmonctl role primary shared
nodeA# hastmonctl role watchdog shared
was developed by