Intel ZT 7102 manual CMM Scripting, CLI Scripting, Associating Scripts to Event Severity

Models: ZT 7102

1 152
Download 152 pages 43.02 Kb
Page 93
Image 93

Intel® NetStructureTMZT 7102 Chassis Management Module

CMM Scripting

18.0CMM Scripting

18.1CLI Scripting

In addition to calling the CLI directly, commands can easily be called through scripts using “bash” shell scripting. These scripts could be tailored to create a single command from several CLI commands or to give more detailed information. For example, you may want to display all of the fans and their speeds on the server. A script could be written that would first call the CLI to find out what fan trays are present. Next it would find out what fan sensors are in each fan tray. Finally it would call the CLI to get the current speeds of each of the fans.

Scripts can be written directly on the CMM and should be saved on the CMM as a file in flash in the /home/scripts directory.

18.1.1Script Synchronization

Script files are not synchronized automatically when copied or changed (by deleting, renaming, altering its chown/chmod/chgrp permissions, etc) in the /home/scripts directory on the active CMM. The Linux “touch” command should be issued to the /home/scripts directory on the active CMM to synchronize the scripts. Scripts are automatically synchronized on any full synchronization (chassis power up, insertion of a new CMM) as well as when they are edited (i.e., using vi and writing the file).

Scripts need to be deleted from both CMMs manually. Deleting a script on the active CMM does not automatically delete the script on the standby.

Note: Scripts are always synchronized from the active CMM to the standby CMM. Adding, editing, or modifying scripts on the standby CMM should be done with caution, and will need to be manually copied to the active CMM.

18.2Associating Scripts to Event Severity

Health events triggered on the CMM can be used to execute scripts stored locally in the /home/scripts directory. Any level of an event can be used as a trigger: normal, minor, major, and critical.The CLI command for associating a script with an event is:

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

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

Target is the sensor to be triggered on.

Action type is NormalAction, MinorAction, MajorAction, or CriticalAction based upon the severity of the event to be triggered on.

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.

Technical Product Specification

93

Page 93
Image 93
Intel ZT 7102 manual CMM Scripting, CLI Scripting, Associating Scripts to Event Severity, Script Synchronization