sam_initialize man page on Scientific

Man page or keyword search:  
man Server   26626 pages
apropos Keyword Search (all sections)
Output format
Scientific logo
[printable version]

SAM_INITIALIZE(3) Corosync Cluster Engine Programmer's ManualSAM_INITIALIZE(3)

NAME
       sam_initialize - Initialize health checking

SYNOPSIS
       #include <corosync/sam.h>

       cs_error_t  sam_initialize  (int	 time_interval,	 sam_recovery_policy_t
       recovery_policy);

DESCRIPTION
       The sam_initialize function is used to initialize health checking of  a
       process.

       Application  can	 have  only one instance of SAM. This function must be
       called before any other of SAM functions.  It is	 recommended  to  ini‐
       tialize before the process begins any process initialization.

       The  time_interval parameter is a timeout in milliseconds before taking
       recovery action after having not received a healthcheck.

       If time_interval parameter is zero, there  is  no  time	limit  and  no
       healthcheck  must  be sent by the process.  In this operational mode, a
       process failure will continue to execute the recovery policy.

       The recovery_policy is defined as type:

	 typedef enum {
	    SAM_RECOVERY_POLICY_QUIT = 1,
	    SAM_RECOVERY_POLICY_RESTART = 2,
	 } sam_recovery_policy_t;

       where

       SAM_RECOVERY_POLICY_QUIT
	      on failure, the process will terminate.

       SAM_RECOVERY_POLICY_RESTART
	      on failure, the process will restart.

       To   perform   event   driven   healthchecking,	 sam_register(3)   and
       sam_start(3) functions must called.  Event driven healthchecking causes
       the duplicate standby process running the SAM  serve  rto  periodically
       request healthchecks from the active process.

RETURN VALUE
       This  call  return  CS_OK  value	 if successful, otherwise and error is
       returned.

ERRORS
       CS_ERR_BAD_HANDLE
	      can happened in case of double initialization.

       CS_ERR_INVALID_PARAM
	      recovery_policy has invalid value.

SEE ALSO
       sam_register(3), sam_start(3), sam_hc_callback_register(3)

corosync Man Page		  12/01/2009		     SAM_INITIALIZE(3)
[top]

List of man pages available for Scientific

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net