SAM_OVERVIEW(8) Corosync Cluster Engine Programmer's Manual SAM_OVERVIEW(8)NAME
sam_overview - Overview of the Simple Availability Manager
OVERVIEW
The SAM library provide a tool to check the health of an application. The main purpose of SAM is to restart a local process when it fails
to respond to a healthcheck request in a configured time interval.
During sam_initialize(3), a duplicate copy of the process is created using the fork(3) system call. This duplicate process copy contains
the logic for executing the SAM server. The SAM server is responsible for requesting healthchecks from the active process, and controlling
the lifecycle of the active process when it fails. If the active process fails to respond to the healthcheck request sent by the SAM
server, it will be sent a user configurable signal (default SIGTERM) to request shutdown of the application. After a configured time
interval, the process will be forcibly killed by being sent a SIGKILL signal. Once the active process terminates, the SAM server will cre-
ate a new active process.
The Simple Availability Manager is meant to be used in conjunction with the cpg service. Used together, it is possible to restart a cpg
process that fails healthchecking during operation.
The main features of SAM include:
o A configurable recovery policy.
o A configurable time interval for health check operations.
o A notification via signal before recovery action is taken.
o A mechanism to indicate to the application the number of times an active process has been created by the SAM server.
o Both application driven health checking and event driven health checking.
Initializing SAM
The SAM library is initialized by sam_initialize(3). sam_initalize(3) may only be called once per process. Calling it more then once has
undefined results and is not recommended or tested.
Setting warning callback
User configurable signal (default SIGTERM) is sent to the application when a recovery action is planned. The application can use the sig-
nal(3) system call to monitor for this signal.
There are no special constraints on what SAM apis may be called in a warning callback. After time_interval expires, a SIGKILL signal is
sent to the active process to force its termination.
Registering the active process
The active process is registered with SAM by calling sam_register(3). This function should only be called one time in a process. After a
recovery action is taken, the new active process will begin execution at the next line of code in a user process after sam_register(3).
Enabling event driven healthchecking
Two types of healthchecking are available to the user. The first model is one where the user application healthchecks during its normal
operation. It is never requested to healtcheck, and if the active process doesn't respond within the time interval, the process will be
restarted.
A more useful mechanism for healthchecking is event driven healthchecking. Because this model is directed by the SAM server, It isn't nec-
essary to guess or add timers to the active process to signal a healthcheck operation is successful. To use event driven healthchecking,
the sam_hc_callback_register(3) function should be executed.
BUGS SEE ALSO sam_initialize(3), sam_finalize(3), sam_start(3), sam_stop(3), sam_register(3), sam_warn_signal_set(3), sam_hc_send(3), sam_hc_call-
back_register(3)corosync Man Page 12/01/2009 SAM_OVERVIEW(8)
Check Out this Related Man Page
sam(1M)sam(1M)NAME
sam - HP System Administration Manager (HP SAM)
SYNOPSIS
[ login | ]
DESCRIPTION
The command launches the HP System Management Homepage (HP SMH) program for performing system administration on the HP-UX operating system.
HP SMH is an enhanced web-based program of HP System Administration Manager (HP SAM) in the HP-UX 11i V3 release. For more information,
see smh(1M).
If the environment variable is set, the Web-based HP SMH is displayed. If the environment variable is not set, the terminal user interface
of HP SMH is displayed.
Deprecation Notice
The command is deprecated in HP-UX 11i V3 release. HP recommends you use the command.
Options
recognizes the following options.
Execute SAM with the privileges associated with the specified
login. When used in conjunction with the Restricted SMH Builder is invoked and initialized with the privileges associated
with the specified login.
You must be a superuser to use this option. See below for more information.
Invokes Restricted SMH.
This enables the system administrator to assign limited privileged user access to SMH functionality. You must be a privi-
leged user to use this option. See the section below for more information.
Restricted SMH
Generally, SMH requires privileged user rights to execute successfully. However, through the use of Restricted SMH, SMH can be configured
to allow subsets of its functionality to certain non-privileged users or groups of users.
System administrators access Restricted SMH by invoking SMH with the option (see above). In Restricted SMH, system administrators may
assign subsets of SAM functionality on a per-user or per-group basis.
When Restricted SMH is used, non-privileged users are promoted to privileged users when necessary to enable them to execute successfully.
By default, Restricted SMH executes all applications as privileged user. However, certain applications, like software distributor have
their own security mechanism and do not follow the Restricted SMH security model. In such cases, the application launched through
Restricted SMH will be executed with the login ID of the user who invokes it.
A non-privileged user who has been given Restricted SMH privileges simply executes and sees only those areas the user is privileged to
access.
All the SMH functional areas require the user to be promoted to be a privileged user in order to execute successfully. SMH does this auto-
matically as needed.
SMH provides a default set of SMH functional areas that the system administrator can assign to other users.
Restricted SMH applies only to terminal user interfaces. Restricted SMH does not apply to Web-based GUI (HP SMH) since HP SMH has its own
roles. For more information, refer to the HP SMH documentation available at and the HP SMH product online help system.
SAM Functional Areas
SAM has been replaced by SMH. For more information on the various functional areas, see smh(1M).
SAM Logging
All actions taken by SAM are logged into the SAM log file at The log entries in this file can be viewed using the SAM utility command (see
samlog_viewer(1)). can filter the log file by user name, by time of log entry creation, and by level of detail.
Functionality Obsolescence and Changes
The following functional areas of the previous SAM interface have been removed, changed, or are planned to be obsolete in a future release
of HP-UX. Alternate procedures are listed as appropriate.
o Trusted systems is planned for obsolescence post HP-UX 11i V3 release.
o Backup and Recovery. Use the and commands from the HP-UX system prompt. You can also use backup tools, such as pax(1), from the HP-UX
command prompt.
o Tape Drives. Add or remove device entries by editing the file or use and commands from the HP-UX command prompt.
o Terminals and Modems. Use and commands from the HP-UX command prompt.
o Uninterruptable Power Supplies.
o Performance Management. Monitor the performance of HP-UX using the commands and
o Process Management. To manage processes for such functions as stopping, continuing, changing priority, use and
o Routine Tasks. Tasks such as shutting down the system and removing files that are large, unowned, or core files are handled by and
o Run SAM on Remote Systems. Executing or configuring SAM on remote systems is no longer needed, because all systems are managed through
HP Systems Insight Manager (HP SIM). For more information on HP SIM, see
o Custom applications cannot be added using SAM. Any custom application that needs to be added in SAM must provide its own registration
files. The registration file has a specific format. You can view a sample registration file from
WARNINGS
cannot be run in the background even if the environment variable is set from HP-UX 11i V3 release.
The Disks and File Systems area of SAM does not display or configure all the types of devices when the legacy mode of mass storage stack is
disabled.
AUTHOR
was developed by HP.
SEE ALSO samlog_viewer(1), evweb(1M), fsweb(1M), hpsmh(1M), kcweb(1M), ncweb(1M), parmgr(1M), pdweb(1M), secweb(1M), smh(1M), smhstartconfig(1M),
ugweb(1M), intro(7).
at
TO BE OBSOLETED sam(1M)