SAM_HC_SEND(3)
π SAM_HC_SEND(3) π
okay bestie, welcome to the Corosync Cluster Engine Programmer's Manual β¨ this is the sam_hc_send page and it's lowkey one of the most important little calls you'll ever make, no cap.
πΈ NAME πΈ
sam_hc_send β send health check confirmation π«Ά
π SYNOPSIS π
#include <corosync/sam.h>
cs_error_t sam_hc_send (void);
β¨ DESCRIPTION β¨
so the sam_hc_send function is literally your app raising its hand and going "i'm alive!! i'm here!!" π
it's how you send a healthcheck confirmation from the application.
the way that you should call this regularly when you're configured for application driven healthchecking. like, on a schedule. do not ghost it. because if you don't call it, recovery action will be taken π (yes, the dramatic kind).
but β and this is the important part, bestie β when you're using event driven healthchecking, this function should not be used. different vibe entirely, okay? don't mix them up π
π« RETURN VALUE π«
this call returns the CS_OK value if it's successful π otherwise an error is returned. simple as that.
π ERRORS π
CS_ERR_BAD_HANDLEβ health checking is not in running state (meaningsam_start(3)has not been executed) or the function is called after stop/finalization of SAM. it's giving "you showed up to the party after it ended" energy.
π SEE ALSO π
and here's the rest of the error crew, because they live down here too π«Ά:
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
ngl, thatCS_ERR_BAD_HANDLEone gets everybody at least once. callsam_start(3)first, bestie, i'm begging π
okay that's the whole page!! this was the corosync Man Page, dated 12/01/2009, and you just read SAM_HC_SEND(3) π slay, go keep your app alive, you got this π¦β¨
π¦ 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 Red Hat, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms