Displaying report 1-1 of 1.
Reports until 10:58, Tuesday 25 August 2015
H1 GRD
jameson.rollins@LIGO.ORG - posted 10:58, Tuesday 25 August 2015 (20862)
New guardian diagnostic infrastructure installed, SYS_DIAG node renamed to DIAG_MAIN

The new SYS_DIAG infrastructure for the Guardian diagnostic nodes has been installed.  The new infrastructure allows for multiple diagnostic nodes with different names.

The old SYS_DIAG node was re-written to use the new infrastructure, and was renamed as DIAG_MAIN:

$USERAPPS/sys/h1/guardian/DIAG_MAIN.py

The old SYS_DIAG node was destroyed, and DIAG_MAIN was created and started.  DIAG_MAIN is now running and appears to be executing all tests normally.

A DAQ restart is required to pull in the new DIAG_MAIN channels.

Usage of SYS_DIAG for diagnostic guardian nodes

The main infrastructure for SYS_DIAG is encoded in the SYS_DIAG module:

$USERAPPS/sys/common/guardian/SYS_DIAG.py

DO NOT MODIFY THE SYS_DIAG MODULE.  This module defines common infrastructure for loading and running the tests.

To create a new diagnostic node, define a new module: $USERAPPS/sys//guardian/DIAG_.  This module should import everything from SYS_DIAG, and define all diagnostic tests as follows:

from SYS_DIAG import *

@SYSDIAG.register
def TEST_SOMETHING()
    """One-line description of test.

    Other info about test.

    """
   if some_condition():
        yield "message to be reported to operator"

Note the "@SYSDIAG.register" decorator above the TEST_SOMETHING function.  That's what registers the function as a diagnostic test that gets run in the RUN_TESTS state (see below).  The module can define as many functions as you like, but only those registered will be run as diagnostic tests.

Also note that the function "yields" a diagnostic message.  Each test can define as many conditions as you like, and for each failing condition, yield a diagnostic message as show above.  The yielded message will be displayed as a NOTIFICATION by the DIAG guardian node, tagged with the test from whence it came.

The DIAG module only needs to define tests as described above, and should not define any GuardState classes. The states are imported from SYS_DIAG: INIT that just lists the registered tests, and RUN_TESTS which runs all tests tagged with the @SYSDIAG.register decorator.

Tests can be defined in separate modules and imported as needed in the usual way.

Displaying report 1-1 of 1.