![]() | We do the math so you don't have to! | ||||||||||||
| Taygeta Scientific Inc. |
The proc_check program is for supplementing heartbeat(http://linux-ha.org/) by handling local restarts of a process (if it is possible). It watches local resources that are supposed to be running as defined by the heartbeat resources file (/etc/ha.d/haresources ). If the application is discovered to have gone down then proc_check attempts to restart it. If it cannot be restarted, then a failover is forced by shutting down the local heartbeat.
The program requires that all applications are controlled by SysV style init files in /etc/ha.d/resource.d or in /etc/rc.d/init.d. These files must process a 'status' arg, returning 'not running' or 'stopped' in the string if the service is not running. It must also process a 'restart' arg.
If any of the applications in the 'haresources' file are to be ignored, then that entry should be put into the hardwired 'ignore' list. This is useful to prevent proc_check from trying to manipulate such things as ipchains which are not really server-type processes.
/* ========================================================================================== */
/* HARDWIRED CONFIGURATION SETTINGS */
// syslog facility setting
#define FACILITY LOG_DAEMON
// syslog severity setting
#define SEVERITY LOG_NOTICE
// how long to wait between checks when in daemon mode (seconds)
#define DREAM_TIME 30
// how many times to locally restart the process before giving up and failing over
// (only applies when in daemon mode)
#define RESET_THRESHOLD 4
// the network interface that is up when serving as the HA master
#define HA_INTERFACE "eth0:0"
/* list whatever resources are to be ignored here, NULL terminate the list */
char *ignore[] =
{
"ipchains",
NULL
};
/* ========================================================================================== */
In either mode, running proc_check will have no effect on the HA standby system, it only influences the processes on the system that is in control of the HA resources at the time. All the actions of proc_check are logged to syslog with the facility and severity controlled by FACILITY and SEVERITY.
|
|