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:22:00 +0200


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:
#include "epicsStdio.h"
#include "epicsStdioRedirect.h"
#include "dbStaticLib.h"
#include "epicsString.h"
#include "iocsh.h"
#include "epicsExport.h"

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));
    }
}

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

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

epicsExportRegistrar(listAlarmRecordsRegistrar);
registrar(listAlarmRecordsRegistrar)

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

Navigate by Date:
Prev: Re: saving samples Ralph Lange
Next: Re: IOC Severity Report Dirk Zimoch
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 Ralph Lange
Next: Re: IOC Severity Report Dirk Zimoch
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 ·