Understanding Heartbeat's State

Alan Robertson alanr at unix.sh
Fri Feb 9 00:05:38 MST 2001


Tony Willoughby wrote:
> 
> I'm looking for the best way to obtain the state of heartbeat.
> 
> Here's why:  I use heartbeat in a system with two redundant cards
> (running Red Hat 6.1).
> 
> The system has a CLI that will allow one to control heartbeat.  I'd like
> to have a CLI command that initiates a failover between these cards.
> But, that CLI command should fail (not do the failover) if the primary
> has not heard from the secondary (say it's not booted or not installed).
> 
> It seems I could do something with set_nstatus_callback(), but this
> seems a little heavy for what I need.

Actually, you *don't* want set_nstatus_callback unless your code is
continually running.  If it is initiated from the command line, and goes
away after it does it's job, you want to call node_status() instead.

> Is there a way to learn the status of heartbeat through /proc or
> /var/state?


	-- Alan Robertson
	   alanr at suse.com



More information about the Linux-HA mailing list