Re: [foxboro] Sysmon messages from AIM*

  • From: "Bruley, Peter T" <Peter.T.Bruley@xxxxxxxxxxxxxx>
  • To: <foxboro@xxxxxxxxxxxxx>
  • Date: Wed, 16 May 2007 08:03:34 -0500

Dave

        Well Foxboro still needs to port "fh_sacego" over to the Windoze =
platform but if you are on a good old UNIX system you can use =
"fh_sacego" to extract "System Monitor" and "Operator Action Journal" =
messages from your aim historian. (It works very similar to the old =
legacy historian sacego tool)

# /usr/fox/disp_tools/fh_sacego
# Usage:
# Version 1.0 for AIM*Release 2.5=20
# Generate an OPERATOR ACTION JOURNAL REPORT
# optionally sending the complete report to the printer
#
# This script expects 7 or 8 positional arguments:
#  1 filename to create (ACE report)
#  2 historian (database) name
#  3 filter for station name (letterbug), null string, or *
#  4 filter for compound name, null string, or *
#  5 filter for block name, null string, or *
#  6 start time (yyyy-mm-dd hh:mm) or (yyyy-mm-dd-hh-mm)
#  7 end time (yyyy-mm-dd hh:mm) or (yyyy-mm-dd-hh-mm)
#  8 optional -m for system monitor messages
# Examples:
# fh_sacego messages.out hist01 "" "" "" "1999-10-27 13:51" "1999-10-31 =
14:34"=20
# fh_sacego messages.out hist01 "*" "*" "*" "1999-10-27 13:51" =
"1999-10-31 14:34"=20
# fh_sacego messages.out hist01 "UCE001" "C1" "B1" "1999-10-27 13:51" =
"1999-10-31 14:34"=20
#=20
#=20
#  To print system monitor messages=20
#  in place of operator action messages add as the eigth argument a -m
# fh_sacego messages.out hist01 "" "" "" "1999-10-27 13:51" "1999-10-31 =
14:34" -m


Here is a script that I run monthly that gathers the last months worth =
of messages into a log file.=20
(just add a monthly task to crontab)
My historian is "hist02" you will need to edit the script to suit your =
historian name and file name needs.

------------------------------------<oaj.sh Start =
>----------------------------------------------
#!/bin/sh
# Script to gather SysMon & Operator Action Journal Report
#=20
#### Edit to suit ######

ACE=3D"/usr/fox/disp_tools/fh_sacego"
DIR=3D"/usr/fox/reports"
FILENAME=3D"HIST02_"`date '+%m%Y'`
HIST=3D"hist02"
ENDD=3D"2037-12-31 23:59"

####### END of Config #########

CURRENTD=3D`date '+%Y-%m-%d'`" 00:00"
CURM=3D`date '+%m'`
CURY=3D`date '+%Y'`
STARTY=3D$CURY

# get data from 2 months ago to current date
STARTM=3D`expr $CURM - 2`
if [ "$STARTM" =3D "0" ]
then
  STARTM=3D12
  STARTY=3D`expr $CURY - 1`
elif [ "$STARTM" =3D "-1" ]
then
  STARTM=3D11
  STARTY=3D`expr $CURY - 1`
fi

if [ "$STARTM" -lt "10" ]
then
  STARTM=3D"0$STARTM"
fi

STARTD=3D`date '+'$STARTY'-'$STARTM'-%d'`" 00:00"
echo "building $HIST OAJ & SMON reports from $STARTD to $ENDD"


# Operator Action Journal Messages:
$ACE $DIR/$FILENAME.oaj $HIST "*" "*" "*" "$STARTD" "$ENDD"
echo "OAJ  report $DIR/$FILENAME.oaj  complete"

# System Monitor Messages:
$ACE $DIR/$FILENAME.smon $HIST "*" "*" "*" "$STARTD" "$ENDD" -m
echo "SMON report $DIR/$FILENAME.smon complete"

# TODO:
# then strip page breaks

------------------------------------<oaj.sh End =
>----------------------------------------------



-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx
[mailto:foxboro-bounce@xxxxxxxxxxxxx]On Behalf Of David Johnson
Sent: Friday, May 11, 2007 6:37 AM
To: foxboro@xxxxxxxxxxxxx
Subject: [foxboro] Sysmon messages from AIM*


1) I remember AIM (before it got splatted by Invensys or SimSci) when=20
it was a Biles & Associates product.

2) I am still in search of a good way to extract sysmon messages from=20
AIM*.  Currently we are working on ODBC calls from VB to get these,=20
but unlike the sample data (which we have working), the message data=20
doesn't appear to have a table name (that we can figure out), even=20
though there are messages in the historian.

I hope someone has the answer to this, because the forehead is=20
begining to ache.

Thanks,
David

=20
=20
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
=20
foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         =
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Djoin
to unsubscribe:      =
mailto:foxboro-request@xxxxxxxxxxxxx?subject=3Dleave
=20
 
 
_______________________________________________________________________
This mailing list is neither sponsored nor endorsed by Invensys Process
Systems (formerly The Foxboro Company). Use the info you obtain here at
your own risks. Read http://www.thecassandraproject.org/disclaimer.html
 
foxboro mailing list:             //www.freelists.org/list/foxboro
to subscribe:         mailto:foxboro-request@xxxxxxxxxxxxx?subject=join
to unsubscribe:      mailto:foxboro-request@xxxxxxxxxxxxx?subject=leave
 

Other related posts: