SAM_HC_CALLBACK_REGISTER(3) Corosync Cluster Engine Programmer's Manual SAM_HC_CALLBACK_REGISTER(3)NAME
sam_hc_callback_register - Register health check callback
SYNOPSIS
#include <corosync/sam.h>
cs_error_t sam_hc_callback_register (sam_hc_callback_t cb);
DESCRIPTION
The sam_hc_callback_register function is used to register a user provided healthcheck callback. After calling of this function, the SAM is
switched from application driven healthchecking to event driven healthchecking. In this mode, sam_hc_send(3) does not need to be executed.
The parameter cb is callback function of type sam_hc_callback_t defined as:
typedef int (*sam_hc_callback_t)(void);
This function will be regulargly called and must return 0 if the process is functioning normally, or -1 if the process is executing abnor-
mally. When -1 is returned, the SAM server execute the registered recovery policy.
A value of NULL can be passed into this function to switch into application driven healthchecking. cb to NULL.
RETURN VALUE
This call return CS_OK value if successful, otherwise and error is returned.
ERRORS
CS_ERR_BAD_HANDLE
SAM was not initialized and registered or health checking is in running state
CS_ERR_LIBRARY
internal library call failed. This can occur during fork() or pipe () system calls and the errno variable can be read to retrieve
more information.
SEE ALSO sam_start(3), sam_stop(3), sam_hc_send(3), sam_register(3),
corosync Man Page 12/01/2009 SAM_HC_CALLBACK_REGISTER(3)
Check Out this Related Man Page
SAM_START(3) Corosync Cluster Engine Programmer's Manual SAM_START(3)NAME
sam_start - Start health checking
SYNOPSIS
#include <corosync/sam.h>
cs_error_t sam_start (void);
DESCRIPTION
The sam_start function is used to start health checking of application. After calling this function, the active process needs to send
healthchecks within the registered time interval by calling sam_hc_send(3). If event driven healthchecking is configured by calling
sam_register(3), an internal thread will be created and send health check confirmations four times per time_interval.
Application must be registered by calling sam_register(3) before this function can be called.
An application can always stop health checking by calling the sam_stop(3) function.
If SAM is initialized with quorum policy SAM_RECOVERY_POLICY_QUIT or SAM_RECOVERY_POLICY_RESTART sam_start will block until corosync
becomes quorate.
RETURN VALUE
This call return CS_OK value if successful, otherwise and error is returned. If SAM is initialized with quorum policy, returned error can
also be quorum error.
ERRORS
CS_ERR_BAD_HANDLE
component was not registered by calling sam_register(3) function.
SEE ALSO sam_hc_send(3), sam_stop(3), sam_register(3), sam_hc_callback_register(3)
CS_ERR_TRY_AGAIN Resource temporarily unavailable
CS_ERR_INVALID_PARAM Invalid argument
CS_ERR_ACCESS Permission denied
CS_ERR_LIBRARY The connection failed
CS_ERR_INTERRUPT System call inturrupted by a signal
CS_ERR_NOT_SUPPORTED The requested protocol/functuality not supported
CS_ERR_MESSAGE_ERROR Incorrect auth message received
CS_ERR_NO_MEMORY Not enough memory to completed the requested task
corosync Man Page 30/04/2010 SAM_START(3)
Hi,
I need to use SAM on HP-UX 11.11.
SAM was working fully but now when I try to view the "Configurable Parameters" SAM comes back with an empty window.
I think it may be related to some security rules I implemented but cannot be sure (mainly permissions tightening).
I have checked... (6 Replies)
On running ‘Disk Devices’ tools under ‘Disks and File Systems’ option of System Administration Manager (SAM) in our UNIX Server (HP 9000 running HPUX B.11.11 U) a warning message appeared. The message that appeared reads as follows
“The Logical Volume Manager shows this device file,... (3 Replies)
Hi Friends,
Can any one help with this:
I have a huge file with the format as
A SAM 4637
B DEPT1 4758 MILAN
A SMITH 46585
B DEPT2 5385 HARRYIS
B SAMUL 63547 GEORGE
B DANIEL 899 BOISE
A FRES 736 74638
I have to read this file and write only the records that starts with "B" only
... (5 Replies)
Hey, new here, so be nice! I'm trying to write a little script to automate the user creation process on one of our boxes. But I would like to be able to use the templates that we have set up in SAM. Is the information in these templates stored in a file somewhere, that I can reference in my... (5 Replies)
Posted this question in another segment by error, but here goes. Lost my notes on the location of the 5min shutdown warning when using SAM. I set my single user system to 0mins so I don't have to keep backspacing out the 5mins and changing it to 0mins.
Thanks
(Located my old notes by accident,... (4 Replies)
Hi I hope this is easy and sorry if I am using the wrong HP terms.
I am looking for a way to glean the command line information from a process I run in SAM?
In AIX I can just select any options I want for particular process and hit F6 and the command line is shown on the screen for use in... (3 Replies)
Good afternoon.
I am a newbie.
We just had a potentially big problem (negated to having good backups).
Basically, there is an option in SAM, to delete all the data from the system that a user ever created.
Lo and behold, silly me, I choose that option, and all sorts of needed files... (5 Replies)
I am constantly getting request to run reports on our AIX server for system health (cpu, io, memory, etc) when users experience performance issues. We are using SolarWinds to monitor system health and it works great for cpu and disk space; however, I cant seem to get memory and io to work... (5 Replies)
Hello,
I've been doing Linux and AIX administration for years, but I'm very new to HPUX. We have an old audit process which involves someone manually using sam to generate user lists. I'd like to kill that old process with fire...
But...
After working a bit in the morning to try and pull... (3 Replies)
Hi,
I have iPlanet 7.0 process running on Solaris system
SunOS mymac15.10 Generic_150400-59 sun4v sparc sun4v.
The link here suggests to use the below command to get process runtime details / health inorder to understand if the iPlanet process is hung or good.
/usr/bin/ps -o "pid ppid... (4 Replies)