<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://help.openclovis.com/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://help.openclovis.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Natesh</id>
		<title>OpenClovis Product Documentation - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://help.openclovis.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Natesh"/>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Special:Contributions/Natesh"/>
		<updated>2026-04-24T11:16:32Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-15T15:02:26Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* Example Code: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/SAFplus/&lt;br /&gt;
 # ./etc/init.d/safplus start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/SAFplus/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest.&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage:===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The event received is containing fields which indicate&lt;br /&gt;
&lt;br /&gt;
Source    : ResourceId of FRU&lt;br /&gt;
&lt;br /&gt;
EventType : Sensor Type&lt;br /&gt;
&lt;br /&gt;
TimeStamp : Time when the HPI Server receives the event.&lt;br /&gt;
&lt;br /&gt;
Severity  : SAHPI_MINOR, SAHPI_MAJOR, SAHPI_CRITICAL&lt;br /&gt;
&lt;br /&gt;
===Details in Event Union===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+align=&amp;quot;bottom&amp;quot;| '''SA Forum APIs with the SAFplus Platform equivalent'''&lt;br /&gt;
|- style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!SensorEventT&lt;br /&gt;
!Event Request Message&lt;br /&gt;
|-&lt;br /&gt;
|SensorNum&lt;br /&gt;
|Sensor #&lt;br /&gt;
|-&lt;br /&gt;
|SensorType&lt;br /&gt;
|Type of Sensor (Ex: Voltage, Temp.)&lt;br /&gt;
|-&lt;br /&gt;
|EventState&lt;br /&gt;
|SAHPI_ES_LOWER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|SensorSpecific&lt;br /&gt;
|Event Specific Data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Code Build and Execution details:===&lt;br /&gt;
&lt;br /&gt;
The file cmPolicy.c contain the details of policies to inhibit/change the event details is available in location .../CmPlugin/src/app/common/plugins/cmPolicy.c in function HpiEventFilter(). For including this file, the make file in location .../src/app/common/plugins/Makefile needs to be changed so that the libraries are included as defined by Application while creating the image and executed by PSP during the handling of events. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| Makefile in location .../src/app/common/plugins/&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    /* change PLUGIN_NAME to LIB_NAMES and assign cmPolicy */&lt;br /&gt;
    LIB_NAMES := cmPolicy&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* add cpp flags */&lt;br /&gt;
    # List any third party libs needed to get this server built (or None):&lt;br /&gt;
    CPPFLAGS += -I$(ASP_CONFIG) &lt;br /&gt;
                -I$(CLOVIS_ROOT)/../../PSP/src/cm/include &lt;br /&gt;
                -I$(CLOVIS_ROOT)/../../buildtools/local/include/openhpi&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Example Code:===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| Sensor Event: Temperature&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; \&lt;br /&gt;
            (event.EventDataUnion.SensorEvent.Assertion == SAHPI_TRUE))&lt;br /&gt;
        {&lt;br /&gt;
            return CL_ERR_OP_NOT_PERMITTED; /* Event is skipped and is not forwarded to application */&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {    &lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The Sensor Event is received for a temperature raise is for one of the blades in chassis, which was a false-alarm. To suppress this, the severity of that event is reduced to minor, so as to prevent from slot reboot/ shutdown. The same can be extended for false alarms in voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| HOT SWAP Event:&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_HOTSWAP) &amp;amp;&amp;amp; \&lt;br /&gt;
            (event.EventDataUnion.HotSwapEvent.HotSwapState != event.EventDataUnion.HotSwapEvent.PreviousHotSwapState))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MAJOR; /* Changing event severity to major */&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
When a FRU event is generated which is a false-alarm, these kind of events are blocked by checking whether there is an actual change in states by comparing its current state with previous state. If there is a real change in FRU, then only forward this to application else block the event.&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-15T15:01:14Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* How to Run cmPlugin model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/SAFplus/&lt;br /&gt;
 # ./etc/init.d/safplus start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/SAFplus/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest.&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage:===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The event received is containing fields which indicate&lt;br /&gt;
&lt;br /&gt;
Source    : ResourceId of FRU&lt;br /&gt;
&lt;br /&gt;
EventType : Sensor Type&lt;br /&gt;
&lt;br /&gt;
TimeStamp : Time when the HPI Server receives the event.&lt;br /&gt;
&lt;br /&gt;
Severity  : SAHPI_MINOR, SAHPI_MAJOR, SAHPI_CRITICAL&lt;br /&gt;
&lt;br /&gt;
===Details in Event Union===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+align=&amp;quot;bottom&amp;quot;| '''SA Forum APIs with the SAFplus Platform equivalent'''&lt;br /&gt;
|- style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!SensorEventT&lt;br /&gt;
!Event Request Message&lt;br /&gt;
|-&lt;br /&gt;
|SensorNum&lt;br /&gt;
|Sensor #&lt;br /&gt;
|-&lt;br /&gt;
|SensorType&lt;br /&gt;
|Type of Sensor (Ex: Voltage, Temp.)&lt;br /&gt;
|-&lt;br /&gt;
|EventState&lt;br /&gt;
|SAHPI_ES_LOWER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|SensorSpecific&lt;br /&gt;
|Event Specific Data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Code Build and Execution details:===&lt;br /&gt;
&lt;br /&gt;
The file cmPolicy.c contain the details of policies to inhibit/change the event details is available in location .../CmPlugin/src/app/common/plugins/cmPolicy.c in function HpiEventFilter(). For including this file, the make file in location .../src/app/common/plugins/Makefile needs to be changed so that the libraries are included as defined by Application while creating the image and executed by PSP during the handling of events. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| Makefile in location .../src/app/common/plugins/&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    /* change PLUGIN_NAME to LIB_NAMES and assign cmPolicy */&lt;br /&gt;
    LIB_NAMES := cmPolicy&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* add cpp flags */&lt;br /&gt;
    # List any third party libs needed to get this server built (or None):&lt;br /&gt;
    CPPFLAGS += -I$(ASP_CONFIG) &lt;br /&gt;
                -I$(CLOVIS_ROOT)/../../PSP/src/cm/include &lt;br /&gt;
                -I$(CLOVIS_ROOT)/../../buildtools/local/include/openhpi&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Example Code:===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| Sensor Event: Temperature&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; \&lt;br /&gt;
            (event.EventDataUnion.SensorEvent.Assertion == SAHPI_TRUE))&lt;br /&gt;
        {&lt;br /&gt;
            return CL_ERR_OP_NOT_PERMITTED; /* Event is skipped and is not forwarded to application */&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {    &lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The Sensor Event is received for a temperature raise is for one of the blades in chassis, which was a false-alarm. To suppress this, the severity of that event is reduced to minor, so as to prevent from slot reboot/ shutdown. The same can be extended for false alarms in voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| HOT SWAP Event:&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_HOTSWAP) &amp;amp;&amp;amp; \&lt;br /&gt;
            (event.EventDataUnion.HotSwapEvent.HotSwapState != event.EventDataUnion.HotSwapEvent.PreviousHotSwapState))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MAJOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to major */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
When a FRU event is generated which is a false-alarm, these kind of events are blocked by checking whether there is an actual change in states by comparing its current state with previous state. If there is a real change in FRU, then only forward this to application else block the event.&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-15T14:59:41Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* Example Code: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest.&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage:===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The event received is containing fields which indicate&lt;br /&gt;
&lt;br /&gt;
Source    : ResourceId of FRU&lt;br /&gt;
&lt;br /&gt;
EventType : Sensor Type&lt;br /&gt;
&lt;br /&gt;
TimeStamp : Time when the HPI Server receives the event.&lt;br /&gt;
&lt;br /&gt;
Severity  : SAHPI_MINOR, SAHPI_MAJOR, SAHPI_CRITICAL&lt;br /&gt;
&lt;br /&gt;
===Details in Event Union===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+align=&amp;quot;bottom&amp;quot;| '''SA Forum APIs with the SAFplus Platform equivalent'''&lt;br /&gt;
|- style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!SensorEventT&lt;br /&gt;
!Event Request Message&lt;br /&gt;
|-&lt;br /&gt;
|SensorNum&lt;br /&gt;
|Sensor #&lt;br /&gt;
|-&lt;br /&gt;
|SensorType&lt;br /&gt;
|Type of Sensor (Ex: Voltage, Temp.)&lt;br /&gt;
|-&lt;br /&gt;
|EventState&lt;br /&gt;
|SAHPI_ES_LOWER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|SensorSpecific&lt;br /&gt;
|Event Specific Data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Code Build and Execution details:===&lt;br /&gt;
&lt;br /&gt;
The file cmPolicy.c contain the details of policies to inhibit/change the event details is available in location .../CmPlugin/src/app/common/plugins/cmPolicy.c in function HpiEventFilter(). For including this file, the make file in location .../src/app/common/plugins/Makefile needs to be changed so that the libraries are included as defined by Application while creating the image and executed by PSP during the handling of events. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| Makefile in location .../src/app/common/plugins/&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    /* change PLUGIN_NAME to LIB_NAMES and assign cmPolicy */&lt;br /&gt;
    LIB_NAMES := cmPolicy&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* add cpp flags */&lt;br /&gt;
    # List any third party libs needed to get this server built (or None):&lt;br /&gt;
    CPPFLAGS += -I$(ASP_CONFIG) &lt;br /&gt;
                -I$(CLOVIS_ROOT)/../../PSP/src/cm/include &lt;br /&gt;
                -I$(CLOVIS_ROOT)/../../buildtools/local/include/openhpi&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Example Code:===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| Sensor Event: Temperature&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; \&lt;br /&gt;
            (event.EventDataUnion.SensorEvent.Assertion == SAHPI_TRUE))&lt;br /&gt;
        {&lt;br /&gt;
            return CL_ERR_OP_NOT_PERMITTED; /* Event is skipped and is not forwarded to application */&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {    &lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The Sensor Event is received for a temperature raise is for one of the blades in chassis, which was a false-alarm. To suppress this, the severity of that event is reduced to minor, so as to prevent from slot reboot/ shutdown. The same can be extended for false alarms in voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| HOT SWAP Event:&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_HOTSWAP) &amp;amp;&amp;amp; \&lt;br /&gt;
            (event.EventDataUnion.HotSwapEvent.HotSwapState != event.EventDataUnion.HotSwapEvent.PreviousHotSwapState))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MAJOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to major */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
When a FRU event is generated which is a false-alarm, these kind of events are blocked by checking whether there is an actual change in states by comparing its current state with previous state. If there is a real change in FRU, then only forward this to application else block the event.&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-15T11:47:54Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest.&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage:===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The event received is containing fields which indicate&lt;br /&gt;
&lt;br /&gt;
Source    : ResourceId of FRU&lt;br /&gt;
&lt;br /&gt;
EventType : Sensor Type&lt;br /&gt;
&lt;br /&gt;
TimeStamp : Time when the HPI Server receives the event.&lt;br /&gt;
&lt;br /&gt;
Severity  : SAHPI_MINOR, SAHPI_MAJOR, SAHPI_CRITICAL&lt;br /&gt;
&lt;br /&gt;
===Details in Event Union===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+align=&amp;quot;bottom&amp;quot;| '''SA Forum APIs with the SAFplus Platform equivalent'''&lt;br /&gt;
|- style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!SensorEventT&lt;br /&gt;
!Event Request Message&lt;br /&gt;
|-&lt;br /&gt;
|SensorNum&lt;br /&gt;
|Sensor #&lt;br /&gt;
|-&lt;br /&gt;
|SensorType&lt;br /&gt;
|Type of Sensor (Ex: Voltage, Temp.)&lt;br /&gt;
|-&lt;br /&gt;
|EventState&lt;br /&gt;
|SAHPI_ES_LOWER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|SensorSpecific&lt;br /&gt;
|Event Specific Data.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===Code Build and Execution details:===&lt;br /&gt;
&lt;br /&gt;
The file cmPolicy.c contain the details of policies to inhibit/change the event details is available in location .../CmPlugin/src/app/common/plugins/cmPolicy.c in function HpiEventFilter(). For including this file, the make file in location .../src/app/common/plugins/Makefile needs to be changed so that the libraries are included as defined by Application while creating the image and executed by PSP during the handling of events. &lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| Makefile in location .../src/app/common/plugins/&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    /* change PLUGIN_NAME to LIB_NAMES and assign cmPolicy */&lt;br /&gt;
    LIB_NAMES := cmPolicy&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
    /* add cpp flags */&lt;br /&gt;
    # List any third party libs needed to get this server built (or None):&lt;br /&gt;
    CPPFLAGS += -I$(ASP_CONFIG) &lt;br /&gt;
                -I$(CLOVIS_ROOT)/../../PSP/src/cm/include &lt;br /&gt;
                -I$(CLOVIS_ROOT)/../../buildtools/local/include/openhpi&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
===Example Code:===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| Sensor Event: Temperature&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; \&lt;br /&gt;
            (event.EventDataUnion.SensorEvent.Assertion == SAHPI_TRUE))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MAJOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
The Sensor Event is received for a temperature raise is for one of the blades in chassis, which was a false-alarm. To suppress this, the severity of that event is reduced to minor, so as to prevent from slot reboot/ shutdown. The same can be extended for false alarms in voltage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| HOT SWAP Event:&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_HOTSWAP) &amp;amp;&amp;amp; \&lt;br /&gt;
            (event.EventDataUnion.HotSwapEvent.HotSwapState != event.EventDataUnion.HotSwapEvent.PreviousHotSwapState))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MAJOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to major */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
When a FRU event is generated which is a false-alarm, these kind of events are blocked by checking whether there is an actual change in states by comparing its current state with previous state. If there is a real change in FRU, then only forward this to application else block the event.&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-11T09:40:42Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest.&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage:===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The event received is containing fields which indicate&lt;br /&gt;
&lt;br /&gt;
Source    : ResourceId of FRU&lt;br /&gt;
&lt;br /&gt;
EventType : Sensor Type&lt;br /&gt;
&lt;br /&gt;
TimeStamp : Time when the HPI Server receives the event.&lt;br /&gt;
&lt;br /&gt;
Severity  : SAHPI_MINOR, SAHPI_MAJOR, SAHPI_CRITICAL&lt;br /&gt;
&lt;br /&gt;
===Details in Event Union===&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
|+align=&amp;quot;bottom&amp;quot;| '''SA Forum APIs with the SAFplus Platform equivalent'''&lt;br /&gt;
|- style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!SensorEventT&lt;br /&gt;
!Event Request Message&lt;br /&gt;
|-&lt;br /&gt;
|SensorNum&lt;br /&gt;
|Sensor #&lt;br /&gt;
|-&lt;br /&gt;
|SensorType&lt;br /&gt;
|Type of Sensor (Ex: Voltage, Temp.)&lt;br /&gt;
|-&lt;br /&gt;
|EventState&lt;br /&gt;
|SAHPI_ES_LOWER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_LOWER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MINOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_MAJOR&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|SAHPI_ES_UPPER_CRITICAL&lt;br /&gt;
|-&lt;br /&gt;
|SensorSpecific&lt;br /&gt;
|Event Specific Data.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-11T09:23:37Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* Advanced Usage: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest.&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage:===&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The event received is containing fields which indicate&lt;br /&gt;
&lt;br /&gt;
Source    : ResourceId of FRU&lt;br /&gt;
&lt;br /&gt;
EventType : Sensor Type&lt;br /&gt;
&lt;br /&gt;
TimeStamp : Time when the HPI Server receives the event.&lt;br /&gt;
&lt;br /&gt;
Severity  : SAHPI_MINOR, SAHPI_MAJOR, SAHPI_CRITICAL&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T11:59:48Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest.&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage:===&lt;br /&gt;
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.&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T11:46:46Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* How to Run cmPlugin model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest.&lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
How&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T11:46:29Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* What you can learn */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
How&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T11:46:09Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
The logs are available in var/log/sys.latest and application_name.latest. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
How&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T10:47:20Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
* We shall show the usage of the filter for a SENSOR Event.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
  The logs are available in var/log/sys.latest and application_name.latest&lt;br /&gt;
&lt;br /&gt;
===Advanced Usage: ===&lt;br /&gt;
&lt;br /&gt;
Copy .&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T10:22:11Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* Usage of CM-Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum == 4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType == SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity = SAHPI_MINOR; /* Changing event severity to minor */&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
  The logs are available in var/log/sys.latest and application_name.latest&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T10:17:31Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* Building the CM-Plugin model and controlling Events in run-time */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/master/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType==SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum==4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity=SAHPI_MINOR;&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType==SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity=SAHPI_MINOR;&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
  The logs are available in var/log/sys.latest and application_name.latest&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T10:15:38Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* How to Run cmPlugin model */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/6.0/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType==SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum==4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity=SAHPI_MINOR;&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType==SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity=SAHPI_MINOR;&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to new directory (/root/SAFplus/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
  The logs are available in var/log/sys.latest and application_name.latest&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-10T09:48:54Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* Usage of CM-Plugin */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
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. &lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/6.0/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ((event-&amp;gt;EventType==SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;EventDataUnion.SensorEvent.SensorNum==4))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity=SAHPI_MINOR;&lt;br /&gt;
        }&lt;br /&gt;
        else if ((event-&amp;gt;EventType==SAHPI_ET_SENSOR) &amp;amp;&amp;amp; (event-&amp;gt;Source == 0x10))&lt;br /&gt;
        {&lt;br /&gt;
             event-&amp;gt;Severity=SAHPI_MINOR;&lt;br /&gt;
        }    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to required location (/root/asp/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
  The logs are available in var/log/sys.latest and application_name.latest&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-08T11:51:26Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
CM-Plugin is an event controlling policy in Platform-Support-Package(PSP) to allow and/or restrict the events received from HPI and forward them to Application during run-time. The policy is defined by Application.&lt;br /&gt;
&lt;br /&gt;
===What you can learn===&lt;br /&gt;
&lt;br /&gt;
How to define a policy to control the events in PSP, so that only interested events are forwarded to Application and unintended events are discarded.&lt;br /&gt;
&lt;br /&gt;
===Building the CM-Plugin model and controlling Events in run-time===&lt;br /&gt;
&lt;br /&gt;
The example code containing Application and CM-Policy is available in &lt;br /&gt;
'''[https://github.com/OpenClovis/SAFplus-Platform-Support-Package/tree/6.0/src/example/cmplugin  PSP/src/example]'''&lt;br /&gt;
&lt;br /&gt;
====Usage of CM-Plugin====&lt;br /&gt;
&lt;br /&gt;
The policy to control the events are defined in cmPolicy.c and is available in location: \CmPlugin\src\app\common\plugins\cmPolicy.c in specified example.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| cmPolicy.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
    ClRcT HpiEventFilter(SaHpiSessionIdT session, SaHpiEventT* event, SaHpiRdrT* rdr, SaHpiRptEntryT* rpt)&lt;br /&gt;
    {&lt;br /&gt;
        /* Define the policy to Allow, Block or Change the events here */&lt;br /&gt;
        if ( /* For Specific condition of Event Ex: event-&amp;gt;Severity==SAHPI_MAJOR */)&lt;br /&gt;
        {&lt;br /&gt;
             /* Change the event to required form */&lt;br /&gt;
             /* event-&amp;gt;Severity=SAHPI_MINOR;      */&lt;br /&gt;
        }&lt;br /&gt;
    &lt;br /&gt;
        return CL_OK;&lt;br /&gt;
    }&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* HpiEventFilter() will be contain the details of specific event to be handled and specific modification for that event.&lt;br /&gt;
&lt;br /&gt;
===How to Run cmPlugin model===&lt;br /&gt;
&lt;br /&gt;
Copy the image to required location (/root/asp/).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform on deployed node &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/&lt;br /&gt;
 # ./etc/init.d/asp start&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Generate event using HPI Event Simulator OR through actual hardware &amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./hpithres&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
  The logs are available in var/log/sys.latest and application_name.latest&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-07T15:46:10Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* Objective */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page to demo CM Plugin.&lt;br /&gt;
&lt;br /&gt;
== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
Plug-in for CM is an event controlling policy in PSP to allow and restrict the events received and forward them to Application during run-time. The policy has a component defined by Application.&lt;br /&gt;
&lt;br /&gt;
===What you will learn===&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-07T15:44:22Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page to demo CM Plugin.&lt;br /&gt;
&lt;br /&gt;
== CM Plug-in Guide==&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
Plug-in for CM is a controlling policy to allow and restrict the events received in PSP and forwarded to Application during run-time. The policy has a component defined by Application and used in PSP &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===What you will learn===&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin</id>
		<title>Doc:latest/evalguide/cmPlugin</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/cmPlugin"/>
				<updated>2013-10-07T15:31:59Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: This is a page to demo CM Plugin.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a page to demo CM Plugin.&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide</id>
		<title>Doc:latest/evalguide</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide"/>
				<updated>2013-10-07T15:29:21Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Table of contents:&lt;br /&gt;
* [[Doc:latest/evalguide/preface | Preface ]]&lt;br /&gt;
* [[Doc:latest/evalguide/scope | Objectives and Scope ]]&lt;br /&gt;
* [[Doc:latest/evalguide/prerequisites | Hardware and Software Prerequisites]]&lt;br /&gt;
* [[Doc:latest/evalguide/setup | Runtime Hardware Setup ]]&lt;br /&gt;
* [[Doc:latest/evalguide/app_ide | Examining the Evaluation Model ]]&lt;br /&gt;
* [[Doc:latest/evalguide/build | Building the Evaluation System and Deploying Runtime Images]]&lt;br /&gt;
* [[Doc:latest/evalguide/csa |Sample Applications]]&lt;br /&gt;
&amp;lt;!--**[[Doc:latest/evalguide/csa101 | csa101&amp;lt;sub&amp;gt;csa201&amp;lt;/sub&amp;gt; Component Management]]--&amp;gt;&lt;br /&gt;
**[[Doc:latest/evalguide/csa101 | csa101 Creating Basic SA-Forum Compliant Applications]]&lt;br /&gt;
**[[Doc:latest/evalguide/csa102 | csa102 Redundancy and Failover]]&lt;br /&gt;
**[[Doc:latest/evalguide/csa103 | csa103 Checkpointing]]&lt;br /&gt;
**[[Doc:latest/evalguide/csa104m | csa104 Messaging]]&lt;br /&gt;
&amp;lt;!-- **[[Doc:latest/evalguide/csa105 | csa105 Software Alarm Management and Provisioning]] --&amp;gt;&lt;br /&gt;
&amp;lt;!--**[[Doc:latest/evalguide/csa106 | csa106 HAL/DO (hardware provisioning with Ethernet port)]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--**[[Doc:latest/evalguide/csa111 | csa111 Hello World with logging]]--&amp;gt;&lt;br /&gt;
**[[Doc:latest/evalguide/csa112 | csa112 Event Subscription]]&lt;br /&gt;
**[[Doc:latest/evalguide/csa113 | csa113 Event Publication]]&lt;br /&gt;
&amp;lt;!--**[[Doc:latest/evalguide/csa114 | csa114 IOC &amp;amp; RMD]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--**[[Doc:latest/evalguide/csa115 | csa115 Name Service]]--&amp;gt;&lt;br /&gt;
&amp;lt;!--**[[Doc:latest/evalguide/csa501 | csa501 Logical Addressing and RMD calls]]--&amp;gt;&lt;br /&gt;
**[[Doc:latest/evalguide/dhaDemo | Dynamic HA application]]&lt;br /&gt;
**[[Doc:latest/evalguide/cmPlugin | CM Plugin Application]]&lt;br /&gt;
**[[Doc:latest/evalguide/csasum | Summary and Next Steps]]&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/Doc:latest/evalguide/csa102</id>
		<title>Doc:latest/evalguide/csa102</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/Doc:latest/evalguide/csa102"/>
				<updated>2013-06-11T04:05:09Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: /* How to create new Project Model csa102 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==csa102 Redundancy and Failover==&lt;br /&gt;
&lt;br /&gt;
===Objective===&lt;br /&gt;
&lt;br /&gt;
This sample demonstrates basic HA (High Availability) and SU (Service Unit) fail-over functionality.  The application has two components, both processing the same workload as csa101, that is, repeatedly printing &amp;quot;Hello World&amp;quot;.  The difference, however, is that in this case there is now an active component and a standby component, with only the active component performing the printing function.&lt;br /&gt;
&lt;br /&gt;
csa102 is quite similar to csa101, and this section will discuss the areas in which they deviate.&lt;br /&gt;
&lt;br /&gt;
===What you will learn===&lt;br /&gt;
&lt;br /&gt;
*Keeping track of HA states and how to respond to callbacks requesting HA state changes.&lt;br /&gt;
&lt;br /&gt;
===How to create new Project Model csa102===&lt;br /&gt;
The first step in setting up our example is to create a model which represents the system that we will eventually deploy. This is done through the '''SAFplus Platform IDE'''. In this chapter we will step through the following tasks:&lt;br /&gt;
* Create a project area&lt;br /&gt;
* Launch the '''SAFplus Platform IDE'''&lt;br /&gt;
* Create the IDE project&lt;br /&gt;
* Specify the Resource model for csa102(the types of physical hardware in our system)&lt;br /&gt;
* Specify the Component model (the types of components or applications in our system)&lt;br /&gt;
* Specify which Components run on which Resources&lt;br /&gt;
* Specify important build and boot parameters&lt;br /&gt;
&lt;br /&gt;
===Creating a New Project Area===&lt;br /&gt;
A project area is a directory on your system where you can develop SAFplus Platform models and generate the code corresponding to those models. This is same as created for ''csa101''.&lt;br /&gt;
&lt;br /&gt;
Create a project area using a script from the command line. To create a project area named '''projectarea1''' in the '''/home/clovis''' directory you should execute the following command:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cl-create-project-area /home/clovis/projectarea1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Launching the SAFplus Platform IDE===&lt;br /&gt;
You can launch the '''SAFplus Platform IDE''' from the command line. If you chose to create symbolic links during installation you can simply enter &amp;lt;code&amp;gt;'''cl-ide'''&amp;lt;/code&amp;gt; from any directory. If you did not create symbolic links during installation you can either:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Add the installation directory to the shells search path and then launch the IDE as follows:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cl-ide&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start cl-ide by specifying the full path&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The splash screen for SAFplus Platform IDE is displayed as illustrated in Figure [[#SAFplus Platform IDE Opening Screen | SAFplus Platform IDE Opening Screen]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAFplus Platform IDE Opening Screen'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_GettingStartedIDE_OpeningScreen.png|frame|center| '''SAFplus Platform IDE Opening Screen''' ]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to select a workspace in which to do your work as illustrated in Figure [[#SAFplus Platform IDE Workspace Launcher | SAFplus Platform IDE Workspace Launcher]].&lt;br /&gt;
&lt;br /&gt;
The workspace you select should correspond to the project area that you created in the previous section (in this case &amp;quot;/home/clovis/projectarea1&amp;quot;). Note that the workspace includes a subdirectory of &amp;quot;/ide_workspace&amp;quot;. This is done strictly for organizational purposes. It keeps the IDE models separate from the generated SAFplus Platform models and code. Select the workspace and click  '''OK'''  to launch SAFplus Platform IDE.&lt;br /&gt;
&lt;br /&gt;
The '''SAFplus Platform''' IDE is launched and you are now looking at the main work area. For more information about the components of this main work area including the SAFplus Platform IDE menu and toolbar, see ''SAFplus Platform IDE User Guide''.&lt;br /&gt;
&lt;br /&gt;
===Creating the Sample Project===&lt;br /&gt;
We will now create a project within the '''SAFplus Platform IDE'''. This project will hold both the resource model and the component model '''csa102''' for our example system. The resource model is a physical view of the resources (the chassis, the blade types, etc.) in our system. The component model is a logical view of the components (applications, etc.) in our system.&lt;br /&gt;
&lt;br /&gt;
We will be using the '''New Project Wizard''' to create our project. The wizard captures some high-level information about the system that we are building and performs a lot of the basic setup for us.&lt;br /&gt;
&lt;br /&gt;
[[File:OpenClovis_Note.png]]The same model that we are building through the wizard could also be created manually through the Resource and Component Editors. For more information on the Resource and Component Editors see ''SAFplus Platform IDE User Guide''.This step is similar compared to ''csa101''.&lt;br /&gt;
&lt;br /&gt;
To launch the '''New Project Wizard''' select  '''File'''  &amp;gt;  '''New''' &amp;gt;  '''Project''' from the IDE menu bar.&lt;br /&gt;
&lt;br /&gt;
The  '''New Project Wizard''' is displayed and  '''Clovis System Project'''  is selected by default as illustrated in Figure [[#New Project Wizard | New Project Wizard]].&lt;br /&gt;
&lt;br /&gt;
Click  '''Next'''. The  '''Clovis System Project''' window is displayed as illustrated in Figure [[#Clovis System Project | Clovis System Project]].&lt;br /&gt;
 &lt;br /&gt;
Enter the following information (These steps are similar compared to ''csa101''):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Name''' : Enter the name of your new project as  '''SampleModel'''. &lt;br /&gt;
&amp;lt;br&amp;gt;Do not use spaces or special characters for the project name. The project name can be alphanumeric, but cannot start with a number or have only numbers.&lt;br /&gt;
&amp;lt;br&amp;gt;Select  '''Use default'''  to use the same directory mentioned in the  '''Directory'''  field. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''SDK Location''': Enter the location where the SAFplus Platform SDK was installed. For e.g. if the SDK was installed at location /opt/clovis, then the SDK location is /opt/clovis/sdk-&amp;lt;version&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Project Area Location''': Enter the location where the generated source code for the model should be stored.&lt;br /&gt;
&amp;lt;br&amp;gt;This can be any existing directory but is usually the project area that was created in the previous section.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;'''Python Location''': Enter the location where Python 2.5.0 is installed on your system. If Python 2.5.0 was installed by SAFplus Platform SDK, the directory is  &amp;lt;code&amp;gt;'''&amp;lt;installation_directory&amp;gt;/buildtools/local/bin'''&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New Blade Type''' window is displayed. This dialog is used to define the blade types that are in our system.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New Blade Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AddBlade.png|frame|center| '''Add New Blade Type''' ]]&lt;br /&gt;
&lt;br /&gt;
Remember that the system we are modelling has only one blade type...a System Controller.&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new blade type to the list. Name this blade type 'SysBlade' (for System Controller blade).&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Add New SAF Node Type''' window is displayed. This dialog is used to define the type of logical node that will be run on the corresponding blade type defined in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Add New SAF Node Type'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AddNode.png|frame|center| '''Add New SAF Node Type''' ]]&lt;br /&gt;
&lt;br /&gt;
Node types represent groups of software. They are classified as either a System Controller class or a Payload class. This distinction gives the node type certain characteristics which cause it to behave in a well-defined manner. Since we have only a System Controller in our system we will add a node type of class System Controller.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a new node type to the list. Name the node type 'SCNode' and ensure that its node class is 'System Controller (SAF Class B)'.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Next'''. The '''Specify Program Names''' window is displayed. This dialog is used to create programs or SAF Service Types and associate them with the SAF Node Types specified in the previous dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Specify Program Names'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_DefineProgramNames.png|frame|center| '''Specify Program Names''' ]]&lt;br /&gt;
&lt;br /&gt;
In our system we need one SAF Service Type which represents our high availability software (csa102 continuously prints &amp;quot;Hello World!&amp;quot; '''redundantly''').&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Use the '''Add''' button to add a program name to the list. Change the program name to 'csa102' and associate the program with the 'SCNode' node type.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click '''Finish'''. This will create the sample model using the blade type, node type, and program name information collected through the 'New Project Wizard' dialogs.&lt;br /&gt;
&lt;br /&gt;
====Configuring the Service Group====&lt;br /&gt;
To make changes to the Service Group double-click on the box titled '''csa101SG'''. The '''Service Group Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='Service Group Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_ServiceGroupDetails.png|frame|center| '''Service Group Details''' ]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;The first change we want to make is to the '''Redundancy Model'''. The '''Redundancy Model''' is the strategy that is used by the SAFplus Platform system to recover from a node failure. For our redundant model (which only has one node with one Active component and another standby component used for redundancy) change the '''Redundancy Model''' to '2N Redundancy' as shown.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:OpenClovis_Note.png]]You will notice that when you change the redundancy model some of the other fields are modified automatically and become read-only. This is to ensure integrity of the redundancy models.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The second change that we want to make is to the '''Admin State'''. The '''Admin State''' defines the state of the component when the system is first brought up. In our case we want to change the '''Admin State''' to be 'Locked Initialized'. This means that when the system first starts up this '''Service Group''' (and its subcomponents) will be initialized but not yet put into a running state. So our csa102 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;The third change that we want to make is to the '''Auto repair'''. The '''Auto repair''' defines the state of the component to be achieved after failure of the component. So our csa102 application will not yet start printing &amp;quot;Hello World!&amp;quot;.&lt;br /&gt;
&amp;lt;li&amp;gt;When you are finished making the changes click the '''OK''' button to commit the changes.&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Configuring the SAF Component====&lt;br /&gt;
To make changes to the SAF Component double-click on the box titled '''csa102'''. The '''SAF Component Details''' dialog is displayed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='SAF Component Details'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_SAFComponentDetails.png|frame|center| '''SAF Component Details''' ]]&lt;br /&gt;
&lt;br /&gt;
To make the model to recover from failure by Stand-by component, the field '''Recovery action on error''' needs to be changed to ''Component fail over''.&lt;br /&gt;
&lt;br /&gt;
The SAF Component represents our high availabilty program or executable. We need to pass a command line argument to this executable. The reason for this argument is to force the program to print the 'Hello World!' output to a special log file for our viewing. We will look at this more closely when we customize our code.&lt;br /&gt;
&lt;br /&gt;
===Configuring Physical Instances===&lt;br /&gt;
The configuration of our logical models is complete. During this process we have defined all of the 'types' of objects in our system. Now it is time to configure actual instances of those objects so that they can be built and deployed.&lt;br /&gt;
&lt;br /&gt;
Object instance configuration is done through the Availability Management Framework (AMF) via the '''AMF Configuration''' dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To launch this dialog go to the the '''Clovis''' menu and select '''AMF Configuration...'''&lt;br /&gt;
&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The '''AMF Configuration''' window will be displayed. If you now completely expand the AMF Configuration branch of the tree in the left-hand pane you will see the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span id='AMF Configuration Dialog'&amp;gt;&amp;lt;/span&amp;gt;[[File:Tutorial_csa102_AMFConfig.png|frame|center| '''AMF Configuration Dialog''' ]]&lt;br /&gt;
&lt;br /&gt;
===Code===&lt;br /&gt;
&lt;br /&gt;
The code can be geneteted using the same steps as mentioned for csa101. The genetated code can be found within the following directory&lt;br /&gt;
 &amp;lt;project-area_dir&amp;gt;/eval/src/app/csa102Comp&lt;br /&gt;
&lt;br /&gt;
This sample component is implemented in a few C modules that are quite similar to the csa101 module.  We will discuss the additions in detail.&lt;br /&gt;
&lt;br /&gt;
We change the logging from the default &amp;quot;application&amp;quot; stream to a custom stream.  To do this, we include the header that defines our config routines, change the default &amp;quot;clLogApp&amp;quot; macro to use a different stream, and define that stream as a global variable:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;    &lt;br /&gt;
#include &amp;quot;../ev/ev.h&amp;quot;&lt;br /&gt;
...&lt;br /&gt;
#define clprintf(severity, ...)   clAppLog(gEvalLogStream, severity, 10, CL_LOG_AREA_UNSPECIFIED, CL_LOG_CONTEXT_UNSPECIFIED, __VA_ARGS__)&lt;br /&gt;
...&lt;br /&gt;
ClLogStreamHandleT  gEvalLogStream = CL_HANDLE_INVALID_VALUE;&lt;br /&gt;
 &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
Next, the log stream is initialized in the application's &amp;quot;main&amp;quot; function:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;   &lt;br /&gt;
    /*&lt;br /&gt;
     * Initialize the log stream&lt;br /&gt;
     */&lt;br /&gt;
    clEvalAppLogStreamOpen((ClCharT*)appName.value, &amp;amp;gEvalLogStream);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This function is implemented in the src/app/ev.c file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As with csa101, the &amp;lt;code&amp;gt;clCompAppAMFCSISet()&amp;lt;/code&amp;gt; function is called to set the component's HA state, and the following block of code assigns this requested state to the component, while verbosely detailing this process:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void clCompAppAMFCSISet(SaInvocationT       invocation,&lt;br /&gt;
                        const SaNameT       *compName,&lt;br /&gt;
                        SaAmfHAStateT       haState,&lt;br /&gt;
                        SaAmfCSIDescriptorT csiDescriptor)&lt;br /&gt;
{&lt;br /&gt;
    /*&lt;br /&gt;
     * Print information about the CSI Set&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    clprintf (CL_LOG_SEV_INFO, &amp;quot;Component [%.*s] : PID [%d]. CSI Set Received\n&amp;quot;, &lt;br /&gt;
              compName-&amp;gt;length, compName-&amp;gt;value, mypid);&lt;br /&gt;
&lt;br /&gt;
    clCompAppAMFPrintCSI(csiDescriptor, haState);&lt;br /&gt;
&lt;br /&gt;
    /*&lt;br /&gt;
     * Take appropriate action based on state&lt;br /&gt;
     */&lt;br /&gt;
&lt;br /&gt;
    switch ( haState )&lt;br /&gt;
    {&lt;br /&gt;
        case SA_AMF_HA_ACTIVE:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the active HA state &lt;br /&gt;
             * for the CSI.&lt;br /&gt;
             */&lt;br /&gt;
            pthread_t thr;&lt;br /&gt;
            &lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: ACTIVE state requested; activating service&amp;quot;);&lt;br /&gt;
            running = 1;&lt;br /&gt;
            pthread_create(&amp;amp;thr,NULL,activeLoop,NULL);&lt;br /&gt;
            &lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_STANDBY:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to take the standby HA state &lt;br /&gt;
             * for this CSI.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Standby state requested&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCED:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active or quiescing HA state. The application &lt;br /&gt;
             * must stop work associated with the CSI immediately.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Acknowledging new state quiesced&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            saAmfResponse(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        case SA_AMF_HA_QUIESCING:&lt;br /&gt;
        {&lt;br /&gt;
            /*&lt;br /&gt;
             * AMF has requested application to quiesce the CSI currently&lt;br /&gt;
             * assigned the active HA state. The application must stop work&lt;br /&gt;
             * associated with the CSI gracefully and not accept any new&lt;br /&gt;
             * workloads while the work is being terminated.&lt;br /&gt;
             */&lt;br /&gt;
            clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Signaling completion of QUIESCING&amp;quot;);&lt;br /&gt;
            running = 0;&lt;br /&gt;
&lt;br /&gt;
            saAmfCSIQuiescingComplete(amfHandle, invocation, SA_AIS_OK);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
In this case the application spawns a thread when it is assigned active which is a very common strategy for threaded applications.  It also sets a global variable &amp;quot;running&amp;quot; to true.  When the application is &amp;quot;quesced&amp;quot; -- that is when the active work assignment is taken away -- the application sets this global variable back to 0 to trigger the active thread to quit itself.  The thread is simply defined as:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
void* activeLoop(void* p)&lt;br /&gt;
{&lt;br /&gt;
    while (running)&lt;br /&gt;
    {&lt;br /&gt;
        clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Threaded Hello World! %s&amp;quot;, show_progress());&lt;br /&gt;
        sleep(2);&lt;br /&gt;
    }&lt;br /&gt;
    return NULL;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
static char* show_progress(void)&lt;br /&gt;
{&lt;br /&gt;
    static char bar[] = &amp;quot;          .&amp;quot;;&lt;br /&gt;
    static int progress = 0;&lt;br /&gt;
&lt;br /&gt;
    /* Show a little progress bar */&lt;br /&gt;
    return &amp;amp;bar[sizeof(bar)-2-(progress++)%(sizeof(bar)-2)];&lt;br /&gt;
}&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example also demonstrates a non-threaded approach.  But first, some background: for both threaded and non-threaded applications, the main must have a &amp;quot;dispatch&amp;quot; loop that handles incoming AMF notifications and calls the relevant callback.  So to implement a single threaded SAF aware application, the programmer must modify this dispatch loop adding active (and potentially standby) functionality:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffccaa;&amp;quot; align=&amp;quot;center&amp;quot;| clCompAppMain.c&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
main(...)&lt;br /&gt;
&lt;br /&gt;
    do&lt;br /&gt;
    {&lt;br /&gt;
        struct timeval timeout;&lt;br /&gt;
        timeout.tv_sec = 2; timeout.tv_usec = 0;&lt;br /&gt;
&lt;br /&gt;
        FD_ZERO(&amp;amp;read_fds);&lt;br /&gt;
        FD_SET(dispatch_fd, &amp;amp;read_fds);&lt;br /&gt;
&lt;br /&gt;
        if( select(dispatch_fd + 1, &amp;amp;read_fds, NULL, NULL, &amp;amp;timeout) &amp;lt; 0)&lt;br /&gt;
        {&lt;br /&gt;
            if (EINTR == errno)&lt;br /&gt;
            {&lt;br /&gt;
                continue;&lt;br /&gt;
            }&lt;br /&gt;
		    clprintf (CL_LOG_SEV_ERROR, &amp;quot;Error in select()&amp;quot;);&lt;br /&gt;
			perror(&amp;quot;&amp;quot;);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
        if (FD_ISSET(dispatch_fd,&amp;amp;read_fds)) saAmfDispatch(amfHandle, SA_DISPATCH_ALL);&lt;br /&gt;
        &lt;br /&gt;
        if (running) clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: Unthreaded Hello World! %s&amp;quot;, show_progress());  // Run the &amp;quot;active&amp;quot; code&lt;br /&gt;
        else clprintf(CL_LOG_SEV_INFO,&amp;quot;csa102: idle&amp;quot;);&lt;br /&gt;
    }while(!unblockNow);      &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This code should be very familiar to anyone who has written single threaded &amp;quot;event loop&amp;quot; style code. As can be seen in the code snippet above, the select is given an idle timeout (in a real application the timeout would be much smaller) and the application only calls &amp;lt;code&amp;gt;saAmfDispatch&amp;lt;/code&amp;gt; if the select actually indicates that the there is data in the FD.  Then it falls down into an &amp;quot;if&amp;quot; statement that checks if we are active &amp;quot;if (running)...&amp;quot; and outputs a log if that is the case.&lt;br /&gt;
&lt;br /&gt;
===How to Run csa102 and What to Observe===&lt;br /&gt;
&lt;br /&gt;
As with the csa101 example we will use the SAFplus Platform Console to manipulate the administrative state of the csa102 service group.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Start the SAFplus Platform Console&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 # cd /root/asp/bin&lt;br /&gt;
 # ./asp_console&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Then put the csa102SGI0 service group into lock assignment state using the following commands.&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 cli[Test]-&amp;gt; setc 1&lt;br /&gt;
 cli[Test:SCNodeI0]-&amp;gt; setc cpm&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa102SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because example 102 has two components there will be two application log files to view.  These are &amp;lt;code&amp;gt;/root/asp/var/log/csa102CompI0Log.latest&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/root/asp/var/log/csa102CompI1Log.latest&amp;lt;/code&amp;gt;.  Viewing these application logs using the &amp;lt;code&amp;gt;tail -f&amp;lt;/code&amp;gt;, you should see the following.&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00029 :   INFO) &lt;br /&gt;
 Component [csa102CompI0] : PID [13418]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00030 :   INFO) &lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00031 :   INFO)&lt;br /&gt;
    IOC Port                : 0x80&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00032 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI0.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:17 2008   (SCNodeI0.13418 : csa102CompEO.---.---.00033 :   INFO)&lt;br /&gt;
 csa102CompI0: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| //root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00028 :   INFO)&lt;br /&gt;
 Component [csa102CompI1] : PID [13422]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00029 :   INFO)&lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00030 :   INFO)&lt;br /&gt;
    IOC Port                : 0x81&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00031 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI1.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:38:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00032 :   INFO)&lt;br /&gt;
 csa102CompI1: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Next, unlock the service group using the following SAFplus Platform Console command.&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
# cli[Test:SCNodeI0:CPM]-&amp;gt; amsUnlock sg csa102SGI0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
and in the /var/log/csa102CompI*.log files we should see:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 23:00:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00487 :   INFO)&lt;br /&gt;
 csa102: Hello World!       .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:19 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00488 :   INFO)&lt;br /&gt;
 csa102: Hello World!        .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:20 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00489 :   INFO)&lt;br /&gt;
 csa102: Hello World!         .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:21 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00490 :   INFO)&lt;br /&gt;
 csa102: Hello World!          .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:22 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00491 :   INFO)&lt;br /&gt;
 csa102: Hello World! .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:23 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00492 :   INFO)&lt;br /&gt;
 csa102: Hello World!  .&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:43:00 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00043 :   INFO)&lt;br /&gt;
 csa102: New state is not the ACTIVE; deactivating service&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
These can be watched in a separate terminal window using &amp;lt;code&amp;gt;tail -f&amp;lt;/code&amp;gt;.  csa102CompI0 is the active component in this case, and csa102CompI1 is the standby.  Consequently, the &amp;quot;Hello world!&amp;quot; lines appear in csa102CompI0.log and not in csa102CompI1.log.  They will continue to be logged to that file until the HA state of that component changes, for example, when the process logging those lines is killed.  In the mean time the standby component: csa102CompI1 just waits until it is told that it should take over the workload.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Changing the HA state of the Client/Server'''&lt;br /&gt;
&lt;br /&gt;
The easiest way to test component fail-over is to kill the process associated with the active component using the &amp;lt;code&amp;gt;kill&amp;lt;/code&amp;gt; command.  For this you need to know the process ID of the active component. To find the process ID issue the following command from a bash shell.&lt;br /&gt;
 # ps -eaf | grep csa102&lt;br /&gt;
This should produce an output that looks similar to the following.&lt;br /&gt;
 root     15872 15663  0 13:49 ?        00:00:01 csa102Comp -p&lt;br /&gt;
 root     16328 15663  0 13:56 ?        00:00:00 csa102Comp -p&lt;br /&gt;
 root     17304 16145  0 14:11 pts/4    00:00:00 grep csa102&lt;br /&gt;
Notice the two entries that end with &amp;lt;code&amp;gt;csa102Comp -p&amp;lt;/code&amp;gt;. These are our two component processes. The first one is usually the active process. This is the one that we will kill. In this case the process ID is 15872. So to kill the active component you issue the command:&lt;br /&gt;
 # kill -9 15872&lt;br /&gt;
[[File:OpenClovis_Note.png]]If this step does not result in the active component being killed then it is likely that the standby component was killed. In this case simply try killing the other process.&lt;br /&gt;
&lt;br /&gt;
After executing the &amp;lt;code&amp;gt;kill&amp;lt;/code&amp;gt; command you can see in the csa102CompI1 application that the standby component is now active.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI1Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 23:00:18 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00487 :   INFO)&lt;br /&gt;
 csa102: Hello World!       .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:19 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00488 :   INFO)&lt;br /&gt;
 csa102: Hello World!        .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:20 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00489 :   INFO)&lt;br /&gt;
 csa102: Hello World!         .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:21 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00490 :   INFO)&lt;br /&gt;
 csa102: Hello World!          .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:22 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00491 :   INFO)&lt;br /&gt;
 csa102: Hello World! .&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 23:00:23 2008   (SCNodeI0.13422 : csa102CompEO.---.---.00492 :   INFO)&lt;br /&gt;
 csa102: Hello World!  .     .&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|} &lt;br /&gt;
&lt;br /&gt;
This indicates that the standby component has taken over for the failed active component.&lt;br /&gt;
&lt;br /&gt;
Looking in the csa102CompI0 application log you can see that this component was killed and has been restarted. Since csa102CompI1 took over as the active component this component now goes into the standby state.&lt;br /&gt;
{| cellspacing=&amp;quot;0&amp;quot; cellpadding = &amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot; align = &amp;quot;center&amp;quot; width=&amp;quot;680&amp;quot;&lt;br /&gt;
 ! style=&amp;quot;color:black;background-color:#ffffaa;&amp;quot; align=&amp;quot;center&amp;quot;| /root/asp/var/log/csa102CompI0Log.latest&lt;br /&gt;
 |- &lt;br /&gt;
 |&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00040 :   INFO)&lt;br /&gt;
 Component [csa102CompI0] : PID [13712]. Initializing&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00041 :   INFO)&lt;br /&gt;
    IOC Address             : 0x1&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00042 :   INFO)&lt;br /&gt;
    IOC Port                : 0x80&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00043 :   INFO)&lt;br /&gt;
 csa102: Instantiated as component instance csa102CompI0.&lt;br /&gt;
&lt;br /&gt;
Sun Jul 13 22:53:02 2008   (SCNodeI0.13712 : csa102CompEO.---.---.00044 :   INFO)&lt;br /&gt;
 csa102CompI0: Waiting for CSI assignment...&lt;br /&gt;
  &amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
You can continue to observe this failover by alternately killing the active component.&lt;br /&gt;
&lt;br /&gt;
To stop csa102 using the SAFplus Platform Console.&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockAssignment sg csa102SGI0&lt;br /&gt;
Successfully changed state of csa102SGI0 to LockAssignment&lt;br /&gt;
 cli[Test:SCNodeI0:CPM]-&amp;gt; amsLockInstantiation sg csa102SGI0&lt;br /&gt;
 cli[Test:SCNodeI0:CPM] -&amp;gt; end&lt;br /&gt;
 cli[Test:SCNodeI0] -&amp;gt; end&lt;br /&gt;
 cli[Test] -&amp;gt; bye&lt;br /&gt;
Successfully changed state of csa102SGI0 to LockInstantiation and exit.&lt;br /&gt;
&lt;br /&gt;
===Summary===&lt;br /&gt;
&lt;br /&gt;
This Sample Application has covered basic HA and failover, with changing the state of a component to active and standby.&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/File:Tutorial_csa102_AMFConfig.png</id>
		<title>File:Tutorial csa102 AMFConfig.png</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/File:Tutorial_csa102_AMFConfig.png"/>
				<updated>2013-06-11T03:58:49Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: Tutorial_csa102_AMFConfig&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tutorial_csa102_AMFConfig&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/File:Tutorial_csa102_SAFComponentDetails.png</id>
		<title>File:Tutorial csa102 SAFComponentDetails.png</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/File:Tutorial_csa102_SAFComponentDetails.png"/>
				<updated>2013-06-11T03:58:02Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: Tutorial_csa102_SAFComponentDetails&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tutorial_csa102_SAFComponentDetails&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/File:Tutorial_csa102_ServiceGroupDetails.png</id>
		<title>File:Tutorial csa102 ServiceGroupDetails.png</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/File:Tutorial_csa102_ServiceGroupDetails.png"/>
				<updated>2013-06-11T03:57:17Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/File:Tutorial_csa102_DefineProgramNames.png</id>
		<title>File:Tutorial csa102 DefineProgramNames.png</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/File:Tutorial_csa102_DefineProgramNames.png"/>
				<updated>2013-06-11T03:56:40Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: Tutorial_csa102_DefineProgramNames&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tutorial_csa102_DefineProgramNames&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/File:Tutorial_csa102_AddNode.png</id>
		<title>File:Tutorial csa102 AddNode.png</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/File:Tutorial_csa102_AddNode.png"/>
				<updated>2013-06-11T03:55:54Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: Tutorial_csa102_AddNode&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tutorial_csa102_AddNode&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	<entry>
		<id>https://help.openclovis.com/index.php/File:Tutorial_csa102_AddBlade.png</id>
		<title>File:Tutorial csa102 AddBlade.png</title>
		<link rel="alternate" type="text/html" href="https://help.openclovis.com/index.php/File:Tutorial_csa102_AddBlade.png"/>
				<updated>2013-06-11T03:54:19Z</updated>
		
		<summary type="html">&lt;p&gt;Natesh: Tutorial_csa102_AddBlade&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tutorial_csa102_AddBlade&lt;/div&gt;</summary>
		<author><name>Natesh</name></author>	</entry>

	</feed>