Hi Mark,
I think I've something going.
I have an 'Apache web server' running on one of my WPs for easy access of
whatever to whoever. :-)
Users can look up, among other things, the alarm history.
The script that runs when the user select 'Caster alarm history' looks like
this:
#!/bin/sh
#
rsh -l root C0AP01 /opt/bhpnzs/utils/hst2txt/get_alarms >/tmp/$REMOTE_ADDR
#
echo Content-type: text/plain
echo
echo "CGI/1.0 Caster Alarm History (the last few hundred)"
echo
#
cat /tmp/$REMOTE_ADDR
######################
As you can see, the guts of the work is on an AP.
The AP script looks like this:
#!/bin/sh
/opt/bhpnzs/utils/hst2txt/hist2txt /usr/hstorian/almhist |
#Concat line 1 and 2
nawk '{
if(NR >= 3) {
if(NR % 2 == 0 ) { #concat line 1 and 2
printf("%s %s\n",$0, firstline)
} else {
firstline = $0 # remember line 1
}
}
}' |
#
# do away with the return messages
#
grep -v RTN |
#
#now sort the alarms...
#
sort -r |
#
# print only the first xxx hunderd of lines
# and only the bits we are interested in
#
awk '{ if (NR < 200)
printf("%s %s %s\n",substr($0,1,14),substr($0,82,66),substr($0,15,55)) }'
################################################################
Thats all there is to it.
Is this useful or wot......
Cheers,
Frits.
> -----Original Message-----
> From: Clement, Mark [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, 3 May 2000 06:08
> To: '[EMAIL PROTECTED]'
> Subject: Process Alarms
>
> Hi all
>
> Has anyone done any work(or have examples) of extracting process alarms from
> I/A and converting to text type file ?
> Do they reside in the historian or informix or some other file system ?
>
> Thanks In Advance
> Mark
-----------------------------------------------------------------------
This list is neither sponsored nor endorsed by the Foxboro Company. All
postings from this list are the work of list subscribers and no warranty
is made or implied as to the accuracy of any information disseminated
through this medium. By subscribing to this list you agree to hold the
list sponsor(s) blameless for any and all mishaps which might occur due to
your application of information received from this mailing list.
To be removed from this list, send mail to
[EMAIL PROTECTED]
with "unsubscribe foxboro" in the Subject. Or, send any mail to
[EMAIL PROTECTED]