Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: IOC Severity Report
From: Dirk Zimoch <dirk.zimoch@psi.ch>
To: <tech-talk@aps.anl.gov>
Date: Tue, 13 Jun 2017 17:32:13 +0200
On 13.06.2017 17:22, Dirk Zimoch wrote:


On 12.06.2017 22:46, Matt Rippa wrote:
We have some IOC's on 3.14.12.4 with several thousand records.
Is there an easy way to get a severity report for any record where

SEVR!=NO_ALARM ?

I ask, because we're moving these systems from 3.13.x. We notice some
non-existing input records now cause SEVR=INVALID and record processing
is halted. This is a great new feature, btw.

Thank you,
-Matt

You can write code that iterates over all records and reads the SEVR
field. Like this one:

Since you wanted 3.13 compatible code, you need some small changes. For 3.13 do not use the dbd file.

#include "epicsVersion.h"
#include "dbStaticLib.h"
#include "stdio.h"
#ifndef BASE_VERSION
/* 3.14+ */
#include "epicsStdioRedirect.h"
#include "iocsh.h"
#include "epicsExport.h"
#endif

extern DBBASE *pdbbase;

void listAlarmRecords()
{
    long status;
    DBENTRY dbentry;
    dbInitEntry(pdbbase, &dbentry);
    for (status = dbFirstRecordType(&dbentry); !status; status = dbNextRecordType(&dbentry))
    for (status = dbFirstRecord(&dbentry); !status; status = dbNextRecord(&dbentry))
    {
        if (dbFindField(&dbentry, "SEVR") != 0) continue;
        if (dbGetMenuIndex(&dbentry) != 0)
            printf("%s %s\n", dbGetRecordName(&dbentry), dbGetString(&dbentry));
    }
}

#ifndef BASE_VERSION
/* 3.14+ */

static const iocshFuncDef listAlarmRecordsDef =
    { "listAlarmRecords", 0, (const iocshArg *[]) {
}};

static void listAlarmRecordsRegistrar(void)
{
    iocshRegister(&listAlarmRecordsDef, listAlarmRecords);
}

epicsExportRegistrar(listAlarmRecordsRegistrar);

#endif

References:
IOC Severity Report Matt Rippa
Re: IOC Severity Report Dirk Zimoch

Navigate by Date:
Prev: Re: IOC Severity Report Dirk Zimoch
Next: Re: crash in access security when other ioc reboots Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: Re: IOC Severity Report Dirk Zimoch
Next: Re: IOC Severity Report Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 13 Jun 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·