sesdaemon(1m)
sesdaemon - Fibre Channel Drive Enclosure Status/Configuration daemon
Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.
NAME sesdaemon - Fibre Channel Drive Enclosure Status/Configuration daemon SYNOPSIS sesdaemon sesdaemon-options-file DESCRIPTION sesdaemon is a daemon which allows communication with attached fibre channel drive enclosures; status is collected and re-configuration is allowed. The low-level transport protocol is the industry standard SES (SCSI-3 Enclosure Services). See sesmgr(1M) for details. The sesdaemon is normally started automatically during boot if sesdaemon is chkconfig'ed on. One process containing 4 threads is started for each instance of sesdaemon; the backend polling thread which handles polling the drive enclosures for status, the frontend RPC thread which is responsible for communication with user interfaces like sesmgr, an event handler thread which handles FRU status change events, and a handler that executes the client's commands. Each event results in a user configurable callout shell script being executed. These scripts are user customizable. OPTIONS The sesdaemon-options-file is provided for customizing certain aspects of sesdaemon operation. This file normally resides at /etc/config/sesdaemon.options. The contents of the file is a list of customizable variables and their values. PollPeriod Specifies the time, in seconds, between successive polls of the SAN enclosures. Status change detection is not interrupt driven so status changes will not be detected until the next poll period. The challenge in selecting an optimal polling period is to find an interval that is short enough to find failures quickly and yet long enough to avoid adding a significant amount of traffic to the SAN. Large or busy SAN's will require more time to execute a poll than smaller or less busy ones. However some FRU failures can cause automatic enclosure shutdowns in as little as 2 minutes. The default value is 60. ExitNoCtlrs On startup, if no fibre channel controllers are found in the system and this is set to 1, all of the sesdaemon threads will terminate. Changing it to 0 will let the threads run as usual whether controllers are present or not. This may be useful in the event controllers will be added later via PCI hotswap inserts. However, once added, an sesmgr poll command must still be executed for sesdaemon to see the new controllers. If the daemons have already exited and need to be restarted, run /etc/init.d/sesdaemon start. The default value is 1. PreRemovalCallout Specifies the pathname of the script to be executed just prior to performing a sesmgr remove command. The default value is /usr/lib/sesdaemon/preremove.CO. PostRemovalCallout Specifies the pathname of the script to be executed immediately following the performance of a sesmgr remove command. The default value is /usr/lib/sesdaemon/postremove.CO. PostInsertionCallout Specifies the pathname of the script to be executed immediately following the performance of a fsesmgr insert command. The default value is /usr/lib/sesdaemon/postinsert.CO. StatusChangedCallout Specifies the pathname of the script to be executed following a FRU status change. The default value is /usr/lib/sesdaemon/statchanged.CO. DebugLevel Specifies the "verbosity" of sesdaemon. The default value is 0. CONFIGURATION OF EVENT CALLOUT SCRIPTS The sesdaemon event handler executes one or more callout scripts in response to a FRU status change or user initiated reconfiguration. Each time a script is executed, 10 arguments are passed to it which a user can use to customize said scripts. For example, the StatusChangedCallout script can be modified to send mail to a system administrator's chatty pager should a fault be detected. The arguments are as follows: 1 - host name A character string specifying the name of the host machine where the FRU status change was detected. 2 - callout type A character string specifying the callout type. The possible values are INFO, RECONFIG and FAILURE. The types can be viewed in increasing priority of importance. The INFO type is used when the FRU status change is informational and little or no system administrator intervention is needed. An example of an informational state change is a disk FRU transitioning from not present to OK following the insertion of of a previously absent disk drive. The RECONFIG type is used following a configuration change which may be of interest to the system administrator. An example of a reconfiguration state change is a disk FRU transitioning from OK to NOT_PRESENT following the execution of a sesmgr remove command. The FAILURE type is used when system administrator intervention is needed due to an unexpected FRU failure. 3 - time stamp A character string specifying the time at which the status change occurred. 4 - channel ID A numerical character string specifying the channel number on which the state change was detected. 5 - enclosure ID A numerical character string specifying the fibre channel drive enclosure on which the state change was detected. Is only specified for the case of the StatusChangedCallout. It is set to -1 for other callouts. 6 - FRU type A character string specifying the type/class of FRU for which the status change is being reported. Possible values are DISK (for disk FRUs), PS (for power supply FRUs), FAN (for fan FRUs), TEMP for temperature, ALARM for alarm, and LCC (for Link-Control-Card FRUs). 7 - FRU ID A numerical character string specifying the ID of the FRU in an enclosure which underwent the state change. This would be the slot number, bay number, or LCC number in the enclosure. 8 - FRU NAME This is the identifier of the FRU, which in the case of drives is the world wide name in hex. 9 - State transition from state A character string specifying the from state of the FRU state transition. Possible values are OK, OFF, FAILED, NOT-PRESENT, OFF if the FRU is not ready, and UNSUP for not supported FRU types. It is only specified for the case of the StatusChangedCallout. It is set to -1 for other callouts. 10 - State transition to state A character string specifying the to state of the FRU state transition. Possible values are the same as the from state. EXAMPLES The following is an example of a StatusChangedCallout C-shell script which may be used to send mail to a system administrator following the detection of a FRU failure. #! /bin/csh -f # # If the status change is a failure, send mail to system # administrator. # set TMP="/tmp/statchanged_$$" if ("$2" == FAILURE) then echo "$6 #$7 in enclosure $5 on channel $4 on host $1 FAILED at $3" > $TMP Mail -s "FRU Failure" root@alpha.centauri.com < $TMP /bin/rm -f $TMP endif LIMITATIONS If a communication path fails, the daemon will automatically try alternate paths to the other SES capable devices. However, driver retries before returning an error can make this a lengthy process. Losing the last SES drive in an enclosure or losing the link to an enclosure may be logged as an LCC failure. Enclosures which dont set their enclosure ID in their SES configuration page will be assigned an enclosure ID from the worldwide name of the first SES drive the daemon locates in the enclosure. Once the id is assigned, it will not be changed by the daemon if the enclosure configuration changes. However on later runs, this will result in the enclosure having a different ID. These utilities are not able to handle soft addressing. Proper SAN configuration is critical to their proper operation. The Xyratex 16 slot enclosure must use addressing mode 0 in 1x16 configurations and mode 2 in 2x8 configurations. Also be very careful if mixing 1x16 and 2x8 configured enclosures on the same loop. Extra care is required when setting the enclosure id's to prevent overlapping the target alpa ranges. If that happens, the other enclosures on the loop will switch to soft addressing. Not all enclosures support all capabilities of these utilities. Simulating failures may not result in exactly the same failure notifications as actual failures. Due to dependencies on drive types, this utility only supports IBM and SEAGATE disk drives. If a target assigns different worldwide names to each of its ports, each port will be treated as an individual target. DIFFERENCES FROM FCAGENT Although the sesdaemon/sesmgr utilities are designed to be similar in look and functionality, there are some important differences. Here are some of these: The arguments on the callouts are slightly different and if fcagent callout code is re-used, these should be carefully checked and understood. The insert and remove commands now make SOP_SCAN ioctls to the affected controllers and the callout scripts run at the proper times. insert will also run ioconfig to make device files for the new devices. bypass and unbypass do not run the insert and remove callouts. sesdaemon does not accept off host command requests and this configuration option has been removed. sesdaemon works with drives on private loops and fabrics. FILES /usr/bin/sesdaemon /etc/config/sesdaemon.options /etc/init.d/sesdaemon /usr/lib/sesdaemon/postinsert.CO /usr/lib/sesdaemon/preremove.CO /usr/lib/sesdaemon/postremove.CO /usr/lib/sesdaemon/statchanged.CO SEE ALSO chkconfig(1M), ioconfig(1M), scsiha(7), sesmgr(1M)