SAM_START(3)
β¨ SAM_START(3) β¨
Corosync Cluster Engine Programmer's Manual π«Ά welcome to the sam_start page bestie, it's giving "let's get this health checking party started"
π NAME π
sam_start β start health checking, periodt
πΈ SYNOPSIS πΈ
#include <corosync/sam.h>
cs_error_t sam_start (void);
π¦ DESCRIPTION π¦
okay so sam_start is the function you call to start health checking of your application. it literally kicks off the whole monitoring vibe. π
after you call it, the active process needs to send healthchecks within the registered time interval by calling sam_hc_send(3). no skipping, no ghosting the healthcheck, iykyk.
if event driven healthchecking is configured by calling sam_register(3), an internal thread will be created and it will send health check confirmations four times per time_interval. that's the thread's whole job and it's serving. β¨
β οΈ heads up: your application must be registered by callingsam_register(3)before this function can be called. no registration, nosam_start. that's the rule.
an application can always stop health checking by calling the sam_stop(3) function. so like, you're never trapped, bestie. π
if SAM is initialized with quorum policy SAM_RECOVERY_POLICY_QUIT or SAM_RECOVERY_POLICY_RESTART, sam_start will block until corosync becomes quorate. so it's just gonna sit there and wait. patiently. main character energy. π
π RETURN VALUE π
this call returns the CS_OK value if successful, otherwise an error is returned. and if SAM is initialized with quorum policy, the returned error can also be a quorum error. π
π ERRORS π
CS_ERR_BAD_HANDLEβ component was not registered by calling thesam_register(3)function. basically you forgot to check in first, bestie π
π§ SEE ALSO π§
and also, while we're here, a whole lil lineup of errors that can show up (they're listed right here in the original too, so here they are, no cap):
CS_ERR_TRY_AGAINβ Resource temporarily unavailableCS_ERR_INVALID_PARAMβ Invalid argumentCS_ERR_ACCESSβ Permission deniedCS_ERR_LIBRARYβ The connection failedCS_ERR_INTERRUPTβ System call interrupted by a signalCS_ERR_NOT_SUPPORTEDβ The requested protocol/functionality not supportedCS_ERR_MESSAGE_ERRORβ Incorrect auth message receivedCS_ERR_NO_MEMORYβ Not enough memory to complete the requested task
and that's the whole page, slay π
this one's from the corosync Man Page, dated 30/04/2010, filed under SAM_START(3) β stay healthy, stay quorate, love u bye π«Άβ¨
π¦ where this page comes from
- debian bookworm: libsam-dev 3.1.7-1+deb12u2 Β· BSD-3-Clause
- debian trixie: libsam-dev 3.1.9-2+deb13u1 Β· BSD-3-Clause
- epel 9: corosynclib-devel 3.1.10-0.2.el9.1 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.10-3.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 43: corosynclib-devel 3.1.9-5.fc43 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-4.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- fedora 44: corosynclib-devel 3.1.10-6.fc44 Β· BSD-3-Clause
- nixos 26.05: corosync 3.1.9
- nixpkgs unstable: corosync 3.1.9
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- opensuse-leap 16.0: corosync-devel 3.1.9-160000.4.1 Β· BSD-3-Clause
- ubuntu jammy: libsam-dev 3.1.6-1ubuntu1 Β· BSD-3-Clause
- ubuntu jammy: libsam-dev 3.1.6-1ubuntu1.2 Β· BSD-3-Clause
- ubuntu noble: libsam-dev 3.1.7-1ubuntu3 Β· BSD-3-Clause
- ubuntu noble: libsam-dev 3.1.7-1ubuntu3.2 Β· BSD-3-Clause
- ubuntu questing: libsam-dev 3.1.9-2ubuntu1
- ubuntu questing: libsam-dev 3.1.9-2ubuntu1.1
- ubuntu resolute: libsam-dev 3.1.9-2ubuntu3 Β· BSD-3-Clause
- ubuntu stonking: libsam-dev 3.1.10-3ubuntu1 Β· BSD-3-Clause
- Copyright (c) 2009-2010 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms