hastmon — cluster
    monitoring daemon
  
    hastmon | 
    [-dFh] [-c
      config] [-P
      pidfile] | 
  
The hastmon 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 hastmon 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
    setproctitle(3)),
    which describes its role and resource it controls. The exact format is:
hastmon: <resource name> (<role>)
 
The connection between two hastmon daemons
    is initiated from the one running as primary to the one running as
    secondary. When primary hastmon is unable to connect
    or connection fails, it will try to re-establish connection every few
    seconds.
On start the hastmon daemon does not pick
    its role up automatically. The role has to be configured with the
    hastctl(8)
    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.
The hastmon daemon can be started with the
    following command line arguments:
  -c
    config 
  - Specify alternative location of the configuration file. The default
      location is /usr/local/etc/hastmon.conf.
 
  -d 
  - Print or log debugging information. This option can be specified multiple
      times to raise the verbosity level.
 
  -F 
  - Start the 
hastmon daemon in the foreground. By
      default hastmon starts in the background. 
  -h 
  - Print the 
hastmon usage message. 
  -P
    pidfile 
  - Specify alternative location of a file where main process PID will be
      stored. The default location is
      /var/run/hastmon.pid.
 
  - /usr/local/etc/hastmon.conf
 
  - The configuration file for 
hastmon and
      hastmonctl(8). 
  - /var/run/hastmonctl
 
  - Control socket used by the
      hastmonctl(8)
      control utility to communicate with 
hastmon. 
  - /var/run/hastmon.pid
 
  - The default location of the 
hastmon PID file. 
Exit status is 0 on success, or one of the values described in
    sysexits(3)
    on failure.
Launch hastmon on both nodes and start
    watchdog on third node. Set role for resource shared
    to primary on nodeA and to secondary on
    nodeB.
nodeB# hastmon
nodeB# hastmonctl role secondary shared
nodeA# hastmon
nodeA# hastmonctl role primary shared
nodeA# hastmon
nodeA# hastmonctl role watchdog shared
 
The hastmon was developed by
    Mikolaj Golub
    ⟨to.my.trociny@gmail.com⟩.