Notify
User Manual

Table of Contents

Synopsis
General
Critical-Message Notification
Environment Variables
File Formats

Log File

Periodic Cleanup


Notify
User Manual

Synopsis

notify [tcid [table1_name [table2_name [preproc_cmd [cmd1 [cmd2]]]]]]

General

notify reads its standard input for lines of text of the form generated by the “Critical Message” producer implemented in Softek interfaces and systems. Lines of text in this format (described later) are first passed through a pre-pass filter function and are then split into three processing streams according to the contents of two text files and the following rules:

  • All lines are logged in the logfile.
  • A line whose error number is contained in table table1_name will be given as input data tothe commands designated by cmd1.
  • A line whose error number is contained in table table2_name will be given as input data tothe commands designated by both cmd1 and cmd2.

The parameters for notify are as follows:

tcid a sequence of four alpha-numeric characters that uniquely identify this instance of notify. This sequence should probably correspond to the TCID of the interface being served (use QUOT for EBS and mrg# for instances of the merge program (with the # replaced by a different number for each merge instance)).

table1_name the name of the file containing lines of error numbers that will be fed to cmd1.

table2_name the name of the file containing lines of error numbers that will be fed to both cmd1 and cmd2.

preproc_cmd a stdin-stdout filter to run over the lines of input text, before they are passed to cmd2 and/or cmd1 (e.g. “uniq -6”).

cmd1 the command that will process less urgent critical messages (perhaps an email command).

cmd2 the command that will process urgent critical messages (perhaps a pager command such as “blat”).

Critical-Message Notification

Unlike the other Softek programs, this program has no critical error processing. Notify is meant to be in the critical message path. To implement critical message processing within it would cause bad things to happen.


Environment Variables

The default behaviour for certain interface functions may be modified by the use of “environment variables”. These variables must be set prior to the interface execution (usually in a “shell” or “batch” file). Command parameters take precendence over equivalent environment variables. The environment variables used by notify all start with “PRS__” and are as follows:

PRS_TABLE1 Used if the “table1_name” parameter is missing.
PRS_TABLE2 Used if the “table2_name” parameter is missing.
PRS_PREPROC Used if the “preproc_cmd” parameter is missing.
PRS_ECMD Used if the “cmd1” parameter is missing.
PRS_PCMD Used if the “cmd2” parameter is missing.

File Formats

Log File

A logfile named <TCID><mmdd>.elg (where <mmdd> stands for the digits representing the month and day that the file was created) is appended to as log-events occur. All “critical messages” are logged. A new logfile is automatically created as soon as necessary after midnight.

Periodic Cleanup

Disk space is consumed according to the number of errors fed to notify. Each day that notify is executed, 1 new file (a log file) is created in the notify execution directory. It is suggested that these files are archived and deleted from the drive every few months.