Product Documentation

Database Administrator's Guide

Previous Topic

Next Topic

Using the ctsysm Utility

To use the ctsysm utility, the FairCom Server must be configured to log messages to the system log. This can be achieved by adding the following keyword to the server's configuration file:

SYSLOG CTSTATUS

With this keyword in place, the server logs each entry in the CTSTATUS.FCS file to the system log files (SYSLOGDT.FCS and SYSLOGIX.FCS).

The utility can read the system log from the beginning each time it starts up, or it can save its current position and start again from that set position by specifying the -f command line option.

The following is the supported command line usage of the FairCom Server Status Monitoring Utility:

ctsysm [-s svn] [-u uid] [-p upw] [-r rpt] [-c cfg] [-f fil] [-l log] [-e]

  • -s svn - FairCom Server name
  • -u uid - user name
  • -p upw - user password
  • -r rpt - repeat interval in seconds (for example, -r 1 is a one-second delay before checking for new messages)
  • -c cfg - the name of the utility’s configuration file (default is ctsysm.cfg)
  • -f fil - save/restore state to file (see notes below)
  • -l log - status log name (SYSLOGDT.FCS) (see notes below)
  • -e - direct ctsysm error messages to standard output in the same format as messages read from the server status log:

    <timestamp> E0000 SYSM MSGT ctsysm ctsysm <error message text>

Notes:

-f causes the utility to save the current state of the utility to the specified file when the utility shuts down and to read the current state of the utility from the specified file when starting up. This option can be used to cause the utility to start reading after the last message it read from the system log instead of starting at the beginning of the system log.

-l specifies the name of the file to read, either SYSLOGDT.FCS (for monitoring server status using the server’s system log) or CTSTATUS.FCS (for monitoring server status using CTSTATUS.FCS directly). Using SYSLOGDT.FCS has the advantage that it supports the -f option and can be used from a remote system, while using CTSTATUS.FCS has the advantage that all status log messages are captured (note that the server may not log some startup and shutdown messages to the system log because the system log is not active during part of startup and shutdown; perhaps the most critical time of interest that the system log is not active is during automatic recovery).

Authentication File

This utility supports the use of an encrypted password file. Encrypted password files keep user IDs and passwords from plain view when the utility is used within a script file. They are created with the ctcmdset utility. The plain text form of the file should be:

; User Id
USERID ADMIN
; User Password
PASSWD <pass>

Use the -1 option to specify the name of the encrypted file. Use the -a option to specify the name of the encrypted file.

Example

The following command causes ctsysm to monitor the FairCom Server system log for the server FAIRCOMS (-s FAIRCOMS) for status messages, checking for new messages every second (-r 1), saving the position of the last entry read to the file ctsysm.log (-f ctsysm.log).

ctsysm -s FAIRCOMS -u ADMIN -p ADMIN -r 1 -c ctsysm.cfg -f ctsysm.log

The ctsysm utility outputs messages in the following format:

<timestamp> <code> <subsystem> <action> <text>

Sample output from the utility is shown below (each message is output as a single line but is shown split into two lines here):

Thu Jul 29 16:44:04 2004 I0455 STUP NONE - User# 01

Alternative server name... FAIRCOMS

Thu Jul 29 16:44:04 2004 I0492 STUP NONE - User# 01

Compatibility bit maps: 00000000 00002000x

Thu Jul 29 16:44:04 2004 I0491 STUP NONE - User# 01

Diagnostic bit maps: 00000000 00000000x

Thu Jul 29 16:44:04 2004 I0490 STUP NONE - User# 01

64-bit File Address Support

Thu Jul 29 16:44:04 2004 I0489 STUP NONE - User# 01

6 Byte Transaction Numbers

Thu Jul 29 16:44:04 2004 I0488 STUP NONE - User# 01

NOWAIT usrsema enabled

Note: When the repeat (-r) option is used, the utility can be stopped by sending it a SIGINT signal.

TOCIndex