Table of Contents
ALMireport - database composite alarms report generator
ALMireport
[type] < list_of_tuples > alarms_report
This program generates
various intermediate reports on the
CHKLIST, CHKPOINT, CHKACT, and
CHKALARM
tables.
The output from those reports is contatenated together and used
as input for the composite report of the tables.
A set of SQL queries and
other tools are used to extract the necessary information from the database
and massage it into a form suitable for use with this program.
The input
should contain one tuple per line. Lines are terminated by a newline. Fields
within a tuple are separated by a |.
The following values are
valid arguments for
type.
- ChkList
generates the intermediate ChkList table report.
- ChkPoint
generates the intermediate ChkPoint table report.
- ChkAct
generates the intermediate ChkAct table report.
- ChkAlarm
generates the intermediate ChkAlarm table report.
- Final
generates the composite table report.
The following
fields from the
ChkList table are used and appear as input to this program
in this order:
RecId, Label, RefName, Value, TMOvalue, and
Comments.
The following fields from the
ChkPoint table are used
and appear as input to this program in this order:
MrecId, RecId, Label,
RefName, CPtype, Offset, LimLo, LimHi, and
Comments.
The following fields from the
ChkAct table are used and appear as
input to this program in this order:
MrecId, RecId, Mask, Mask2, Value,
and
Comments.
The following fields from the
ChkAct table are used and appear as input to this program in this order:
MrecId, RecId, Mask, Mask2, and
Message.
The
Final
report uses tuples output from the other reports described above.
#
# produce individual intermediate table reports
#
psql -d testdb -qt -f CA.pqry | WStrim trim.ca | ALMireport ChkAct > f1
psql -d testdb -qt -f CL.pqry | WStrim trim.cl | ALMireport ChkList > f2
psql -d testdb -qt -f CP.pqry | WStrim trim.cp | ALMireport ChkPoint > f3
psql -d testdb -qt -f AL.pqry | WStrim trim.al | ALMireport ChkAlarm > f4
#
# combine together, put into order, remove blank lines
#
cat f1 f2 f3 f4 | sort | sed ’/^$/d’ > f5
#
# produce final report
#
ALMireport Final < f5 > NLK.lst
$Id: ALMireport.8,v 1.0 1999/02/09 18:16:21 kitchen
Exp $
Table of Contents