1SAM_START(3) Corosync Cluster Engine Programmer's Manual SAM_START(3)
2
3
4
6 sam_start - Start health checking
7
8
10 #include <corosync/sam.h>
11
12
13 cs_error_t sam_start (void);
14
15
17 The sam_start function is used to start health checking of application.
18 After calling this function, the active process needs to send
19 healthchecks within the registered time interval by calling
20 sam_hc_send(3). If event driven healthchecking is configured by call‐
21 ing sam_register(3), an internal thread will be created and send health
22 check confirmations four times per time_interval.
23
24
25 Application must be registered by calling sam_register(3) before this
26 function can be called.
27
28
29 An application can always stop health checking by calling the
30 sam_stop(3) function.
31
32
33 If SAM is initialized with quorum policy SAM_RECOVERY_POLICY_QUIT or
34 SAM_RECOVERY_POLICY_RESTART sam_start will block until corosync becomes
35 quorate.
36
37
39 This call return CS_OK value if successful, otherwise and error is
40 returned. If SAM is initialized with quorum policy, returned error can
41 also be quorum error.
42
43
45 CS_ERR_BAD_HANDLE
46 component was not registered by calling sam_register(3) func‐
47 tion.
48
49
51 sam_hc_send(3), sam_stop(3), sam_register(3), sam_hc_callback_regis‐
52 ter(3)
53
54 CS_ERR_TRY_AGAIN Resource temporarily unavailable
55
56 CS_ERR_INVALID_PARAM Invalid argument
57
58 CS_ERR_ACCESS Permission denied
59
60 CS_ERR_LIBRARY The connection failed
61
62 CS_ERR_INTERRUPT System call interrupted by a signal
63
64 CS_ERR_NOT_SUPPORTED The requested protocol/functionality not supported
65
66 CS_ERR_MESSAGE_ERROR Incorrect auth message received
67
68 CS_ERR_NO_MEMORY Not enough memory to complete the requested task
69
70
71
72corosync Man Page 30/04/2010 SAM_START(3)