Re: [foxboro] Foxapi Applications

  • From: "Michael J. Wing" <mwing@xxxxxxxxxxxxxxxx>
  • To: <foxboro@xxxxxxxxxxxxx>
  • Date: Thu, 28 Feb 2002 13:36:34 -0500

Just one more note on the "C" program Corey suggests.  We had the problem
with the programs hanging and Alex J gave us example code (in this list) to
recover within the C program using a timer and trapping a UNIX signal .  We
did not actually implement that in the final application although it seemed
to work ok in our tests.  For now we are relying on the startup script to
check API is running.  That can cause problems if the application tries to
run and the API has been shutdown at some point after initial startup.

-----Original Message-----
From: foxboro-bounce@xxxxxxxxxxxxx
[mailto:foxboro-bounce@xxxxxxxxxxxxx]On Behalf Of Johnson, Alex
(Foxboro)
Sent: Thursday, February 28, 2002 1:22 PM
To: foxboro@xxxxxxxxxxxxx
Subject: Re: [foxboro] Foxapi Applications



Actually, the suggestion that Corey makes is useful, but it must follow the
suggestion that Alex D makes.


If you simply do what Corey suggests, the program will hang-up waiting for
FoxAPI to startup. I've never had a program recover from that problem.


So, testing to see if the processes are running is a necessary first step.
Testing if they are working is a good thing, too.


Regards,


Alex Johnson
System Products - Invensys Systems, Inc.
10707 Haddington
Houston, TX 77043
713.722.2859 (office)
713.722.2700 (switchboard)
713.932.0222 (fax)
ajohnson@xxxxxxxxxxx <mailto:ajohnson@xxxxxxxxxxx>



        -----Original Message-----
        From:   Deen, Ron [SMTP:rdeen@xxxxxxxxxxx]
        Sent:   Thursday, February 28, 2002 9:46 AM
        To:     foxboro@xxxxxxxxxxxxx
        Subject:        Re: [foxboro] Foxapi Applications


        Nice too, but I don't know C :-(
        As long as I can get away with a script I will. (I know: cowardly
behaviour
        on my side) The bourne shell is always near.
        I do "run" C programs though.

        Ron

        -----Original Message-----
        From: Corey R Clingo [mailto:clingoc@xxxxxxxxxxxxx]
        Sent: Thursday, February 28, 2002 3:45 PM
        To: foxboro@xxxxxxxxxxxxx
        Subject: Re: [foxboro] Foxapi Applications




        I would think that you could test FoxAPI by retrieving value(s) you
always
        know to be there, e.g., idle time on a few CPs.  Unfortunately, this
        probably involves writing a C program, sort of a FoxAPI "ping".  It
still
        involves waiting for FoxAPI to come up, but at least you are
actually
        testing the entire mechanism -- not just the presence of processes.

        Corey Clingo





        "Deen, Ron" <rdeen@xxxxxxxxxxx> on 02/28/2002 12:53:30 AM

        Please respond to foxboro@xxxxxxxxxxxxx
        To:   foxboro
        cc:
        Subject:  Re: [foxboro] Foxapi Applications




        >>
        I was hoping that there was some nice
        method that does not involve looping to check for Foxapi
        <<
        So do I. But this is what I came up with for my application. Any
smarter
        solution around that can be shared?
        You could just "sleep long" but I don't like that approach myself
(well not
        in a script that is), does any real programmer have any thoughts on
this
        subject?

        Of course you don't have to watch for FoxAPI in every program start
script.
        Just do it once and if FoxAPI is running all depending progs can be
        processed.
        That last remark was probably just annoying but I pressed "Send"
before I
        could remove it.

        Regards

        Ron Deen

        -----Original Message---
        From: Joe Sanguinetti [mailto:Joe.Sanguinetti@xxxxxxxxxxxx]
        Sent: Wednesday, February 27, 2002 6:50 PM
        To: 'foxboro@xxxxxxxxxxxxx'
        Subject: Re: [foxboro] Foxapi Applications


        Thanks,

             I am doing something similar.  I was hoping that there was some
nice
        method that does not involve looping to check for Foxapi.

        Thanks Again,
        Joe

        -----Original Message-----
        From: Wolf, John L. [mailto:jlwolf@xxxxxxxxxxxxxx]
        Sent: Wednesday, February 27, 2002 11:40 AM
        To: 'foxboro@xxxxxxxxxxxxx'
        Subject: Re: [foxboro] Foxapi Applications



        Hi Joe.
        A solution I employ was given to me by Ron Deen via the list.  I've
        modified
        it slightly to fit our installation, but it works every time.  Here
is the
        email Ron sent to me:

        *****************************
        What I did for PI:
        In the script that starts the PI client I added a test for the
presence of
        the FoxAPI progs.
        The count of 5 programs (-lt 5) includes the "grep foxapi" utility
of
        course.

        while [ `ps -ef|grep foxapi|wc -l` -lt 5 ]
        do
           echo "Foxapi not running yet"
           sleep 10
        done

        After this I run the PI start script.
        Simple but at least a bit conditional. You can make it more
intelligent of
        course...

        ****************************

        Hope it answers your question.


              John L. Wolf
          Systems Analyst
        Tilden Mining Co. L.C.


        -----Original Message-----
        From: Joe Sanguinetti [mailto:Joe.Sanguinetti@xxxxxxxxxxxx]
        Sent: Wednesday, February 27, 2002 11:45 AM
        To: foxboro@xxxxxxxxxxxxx
        Subject: [foxboro] Foxapi Applications


        I have a few Applications that use Foxapi.  What is the best way to
start
        these up when the machine is rebooted so I know Foxapi is running
before I
        start them.  Does anyone have a good solution for this?

        Joe





_______________________________________________________________________
        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






_______________________________________________________________________
        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






_______________________________________________________________________
        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




_______________________________________________________________________
        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











_______________________________________________________________________
        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




_______________________________________________________________________
        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



_______________________________________________________________________
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


 
 
_______________________________________________________________________
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: