Difference between revisions of "Doc:latest/evalguide/cmPlugin"

(Advanced Usage:)
Line 65: Line 65:
  
 
===Advanced Usage:===
 
===Advanced Usage:===
HPI layer can handle events for various kinds originated for Resource Details, Domain events, Sensor, Hot-Swap, Watchdog, Software-Events, OEM, User events, Dimi, Fumi events. While developing any event specific change either in Middleware or in Application, the specific event is allowed from PSP and is received by Application and rest of events are suppressed.
+
The Shelf Manager in AdvancedTCA/MicroTCA is notified about health and management status changes in the shelf via standard IPMI event messages that are forwarded to the active Shelf Manager. IPM Controllers are configured to generate event messages when they detect a significant condition getting asserted or deasserted in the system. This includes messages for events such as ‘temperature threshold exceeded’, ‘voltage threshold exceeded’, ‘power fault’, ‘watchdog expired’, etc. IPMI event messages are typically associated with a Sensor. The type and event type of the Sensor associated with an event helps the Shelf Manager and HPI User decide on actions to be taken on account of that event.
 +
 
 +
HPI layer can handle events for various kinds which can be originated for Resource Details, Domain events, Sensor, Hot-Swap, Watchdog, Software-Events, OEM, User events, Dimi, Fumi events. While developing any event specific change either in Middleware or in Application, the specific event is allowed from PSP and is received by Application and rest of events are suppressed.
 +
 
 +
The event received is containing fields which indicate
 +
 
 +
Source    : ResourceId of FRU
 +
 
 +
EventType : Sensor Type
 +
 
 +
TimeStamp : Time when the HPI Server receives the event.
 +
 
 +
Severity  : SAHPI_MINOR, SAHPI_MAJOR, SAHPI_CRITICAL

Revision as of 09:23, 11 October 2013

Contents

CM Plug-in Guide

Objective

CM-Plugin is an event controlling policy in Platform-Support-Package(PSP) to allow, restrict, or modify the events received from HPI and forwarded to the Application during run-time. The policy is defined by the Application programmer and is loaded into the Chassis Manager and called whenever a hardware event is received.

The purpose of this plugin is to allow the application programmer to intercept events that may be miscategorized by the hardware and transform them. For example, if a voltage loss event is reported as MAJOR in a dual power supply system, this even should not cause system shutdown so can be reduced to a MINOR level event.

What you can learn

How to define a policy to control the events in the CM, so that only interested events are forwarded to the Application and unintended events are discarded.

Building the CM-Plugin model and controlling Events in run-time

The example code containing Application and CM-Policy is available in PSP/src/example

Usage of CM-Plugin

The policy to control the events is defined in cmPolicy.c and is available in the location: .../CmPlugin/src/app/common/plugins/cmPolicy.c in specified example.

  • HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.
  • We shall show the usage of the filter for a SENSOR Event.
cmPolicy.c

    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)
    {
        /* Define the policy to Allow, Block or Change the events here */
        if ((event->EventType == SAHPI_ET_SENSOR) && (event->EventDataUnion.SensorEvent.SensorNum == 4))
        {
             event->Severity = SAHPI_MINOR; /* Changing event severity to minor */
        }
        else if ((event->EventType == SAHPI_ET_SENSOR) && (event->Source == 0x10))
        {
             event->Severity = SAHPI_MINOR; /* Changing event severity to minor */
        }    
        return CL_OK;
    }
  

In the above example, the Sensor Events from Sensor #4 is changed to lower severity, so that the event is given lower importance or can be ignored and other events which are of importance can be received and processed by Application.


How to Run cmPlugin model

Copy the image to new directory (/root/SAFplus/).

  1. Start the SAFplus Platform on deployed node
     # cd /root/asp/
     # ./etc/init.d/asp start
  2. Generate event using HPI Event Simulator OR through actual hardware
     # cd /root/asp/bin
     # ./hpithres

The logs are available in var/log/sys.latest and application_name.latest.

Advanced Usage:

The Shelf Manager in AdvancedTCA/MicroTCA is notified about health and management status changes in the shelf via standard IPMI event messages that are forwarded to the active Shelf Manager. IPM Controllers are configured to generate event messages when they detect a significant condition getting asserted or deasserted in the system. This includes messages for events such as ‘temperature threshold exceeded’, ‘voltage threshold exceeded’, ‘power fault’, ‘watchdog expired’, etc. IPMI event messages are typically associated with a Sensor. The type and event type of the Sensor associated with an event helps the Shelf Manager and HPI User decide on actions to be taken on account of that event.

HPI layer can handle events for various kinds which can be originated for Resource Details, Domain events, Sensor, Hot-Swap, Watchdog, Software-Events, OEM, User events, Dimi, Fumi events. While developing any event specific change either in Middleware or in Application, the specific event is allowed from PSP and is received by Application and rest of events are suppressed.

The event received is containing fields which indicate

Source  : ResourceId of FRU

EventType : Sensor Type

TimeStamp : Time when the HPI Server receives the event.

Severity  : SAHPI_MINOR, SAHPI_MAJOR, SAHPI_CRITICAL