Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

ctsmon - Server Heartbeat Monitor

ctsmon is used to check the current running status of a FairCom DB Server. Frequently, this is the "heartbeat" monitoring component in a clustering failover solution.

Usage

ctsmon [-u name] [-p pw] [-s s1,s2,...] [-t nn] [-c nn] [-d nn] [-o api_option]

where

  • -u name - User name to connect to the server with. Default is none.
  • -p pw - User password. Default is none.

    It is assumed that all servers in the server list (-s) have the same user ID and password.

  • -s Server_name - Name of the Faircom server to log into.

    The server name has the form of name[@host]. If no @host is given the local host is assumed. @host can also be given as using an I/P address Example: FAIRCOMS@192.168.1.1 Default is FAIRCOMS

  • -t nn - Time out value in seconds. Default is 30 seconds.
  • -c nn - Loop count for checking the server. This parameter has three possible values:
    • +nn - Exit after nn times regardless if the server is up or down.
    • 00 - Loop forever regardless if the server is up or down.
    • -nn - Loop forever while the server is up, if unable to log into the server, exit after nn loops.
  • -d nn - Set debugging trace level to n (0 to 5).
  • -o api_option - An optional API call to retrieve additional information from server demonstrating the server is functional.

    api_option is one of the following:

    • appname - First APP_NAME_LIST entry
    • curtime - Current server time in seconds since 1970
    • commits - Current number of database commits (ctGSMS.sct_trend)

Return status

-1 - Usage error, or internal error.

0 - Server responded.

+n - Error returned from InitISAMXtd call.

Description

This utility is intended for use with cluster management systems such as the Open Cluster Framework (OCF) and Pacemaker on Linux, and Solaris and Microsoft cluster managers. This is usually run in the background as a daemon process. It is a useful utility to use with any monitoring the current availability status of a FairCom DB server process.

The availability check is a basic connection/disconnection attempt. If the connection succeeds, it is assumed the server is active and available. If a further check such as the ability to retrieve data is required, the api_option can be used to trigger that request.

The source code of this utility is provided in the FairCom DB SDK and can be further customized for specific usages.

Example

ctsmon -u ADMIN -p ADMIN -s 10.6.1.1 -t 20 -c 3

TOCIndex