Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages
HASTMON(8) FreeBSD System Manager's Manual HASTMON(8)

cluster monitoring daemon

hastmon [
] [
-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:
Specify alternative location of the configuration file. The default location is /usr/local/etc/hastmon.conf.
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 hastmon starts 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 /var/run/

The configuration file for hastmon and hastmonctl(8).
Control socket used by the hastmonctl(8) control utility to communicate with hastmon.
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

hastmon.conf(5), hastmonctl(8).

The hastmon was developed by Mikolaj Golub ⟨⟩.
October 20, 2010 FreeBSD 12.0-RELEASE

Search for    or go to Top of page |  Section 8 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.