CMM Scripting

Script is the script file or executable in the /home/scripts directory to be run including parameters to be sent to the script. The script and parameters should be enclosed in quotes. The script parameter should not include the /home/scripts path.

Note: If applicable, remember to set a script for when a sensor returns to normal (NormalAction). A script will not automatically stop running when a sensor returns to a normal setting (no alarms or events).

For example, if you wanted to run a blade powerdown script called “powerbladedown” stored in /home/scripts when the ambient temperature triggered a major event for a blade 4, the command would be:

cmmset –l blade4 –t “Ambient Temp” –d MajorAction –v “bladepowerdown 4”

In this example, the /home/scripts/bladepowerdown script or executable will be executed with “4” as a parameter when blade4’s Ambient Temp sensor generates a major health event.

18.2.1Listing Scripts Associated With Events

The scripts that are associated with events are put into the /etc/actionscripts.cfg file. To display a list of scripts associated with events, cat the /etc/actionscripts.cfg file.

For further information on event scripting commands and its arguments, see Section 8, “The Command Line Interface (CLI)” on page 71.

18.2.2Removing Scripts From an Associated Event

To remove scripts from occurring for an event in which they have been associated, issue the following command:

cmmset –l [location] –t [target] –d [action type] –v none

Location is the component in the chassis that the health event is associated with.

Target is the sensor that was being triggered on.

Action type is NormalAction, MinorAction, MajorAction, or CriticalAction based upon the severity of the event that was being triggered on.

18.3Setting Scripts for Specific Individual Events

The CMM allows scripts to be associated with specific events which may not necessarily be health related, such as the assertion of a threshold sensor. This allows any single event that can occur on the CMM to have an associated script, or scripts with it.

18.3.1Event Codes

To allow the user to set scripts based on any event, a unique event code is assigned to each event that can occur on the CMM. The list of events and the codes associated with each event is detailed in Section 11, “Health Events” on page 104.

MPCMM0001 Chassis Management Module Software Technical Product Specification

165

Page 165
Image 165
Intel MPCMM0001 manual Listing Scripts Associated With Events, Removing Scripts From an Associated Event, Event Codes