EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: devStats - OSI version of devVxStats
From: Andrew Johnson <[email protected]>
To: [email protected]
Date: Thu, 2 Oct 2008 15:35:28 -0500
On Thursday 02 October 2008 11:39:42 Rees, NP (Nick) wrote:
> I had a conversation with Jeff about this in 2005 and as a result there
> is a routine
>
> void casStatsFetch ( unsigned *pChanCount, unsigned *pCircuitCount )
>
> In rsrv/caservertask.c. So that bit's easy. We use it in our version of
> vxStats.

That routine is not mentioned in the release notes or the appDevGuide at all, 
but has apparently been present in Base since R3.14.8 â thanks for telling 
the rest of the us about it!

For Base R3.14.10 and sncseq 2.0.12 I added the routines below which return 
statistics from the IOC's CA client code (Access Security, database links and 
sequencer programs).  From the R3.14.10 release notes:

>   void ascaStats(int *pchans, int *pdiscon);
>   void dbcaStats(int *pchans, int *pdiscon);
>   void seqcaStats(int *pchans, int *pdiscon);
>
> The pchans parameter should point to integer storage which will be set to
> the total number of channels open, while the value at the pdiscon pointer
> will be set to the number of channels currently disconnected. Prototypes
> for these routines can be found in the header files asCa.h and dbCaTest.h
> (seqCom.h for the sequencer).

I have longin device support and a database that uses the above routines, 
including now casStatsFetch(), should anyone want a copy.  At the APS it's 
part of our cross-platform "all IOCs must use this" standard support module 
which also does a few other things.

Stephanie also asked:
> (2) It would be nice if a routine were added to epicsThread in epics/base
> to provide the number of suspended threads for soft IOCs.

That functionality is already present, although it doesn't work quite the way 
you requested.  Something called the task watchdog has been part of the IOC 
since 199x, and accepts requests to call a function whenever a watched task 
gets suspended.  Almost all iocCore tasks register themselves to be watched.  
I just enhanced the taskwd API as part of R3.14.10 but the old API still 
works (there's now a taskwdShow command as well).

At the APS we have subroutine record code that registers with the watchdog and 
flags up an alarm if any of our threads get suspended.  You can also reset it 
if you manage to restart the thread (some vxWorks bus errors are recoverable, 
so a "tr <tid>" may save you from having to reboot if you're lucky).

I can provide this subroutine code on request as well; it just happens to use 
the same database as the above CA status records.

- Andrew
-- 
Talk is cheap. Show me the code. -- Linus Torvalds


References:
devStats - OSI version of devVxStats Allison, Stephanie
RE: devStats - OSI version of devVxStats Rees, NP (Nick)

Navigate by Date:
Prev: Re: Base R3.14.10-RC1 Released Andrew Johnson
Next: Re: Base R3.14.10-RC1 Released Benjamin Franksen
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: devStats - OSI version of devVxStats Rees, NP (Nick)
Next: Re: devStats - OSI version of devVxStats Steve Lewis
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  <20082009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Sep 2010 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·