Sun Microsystems 440 manual

Page 87

CODE EXAMPLE B-1Example Program for get/set Status of the Alarms (Continued)

#include <sys/types.h>

if ((ald.alarm_state != ALARM_OFF) && (ald.alarm_state != ALARM_ON)) {

printf("Invalid value returned: %d\n", ald.alarm_state); exit(1);

}

printf("ALARM.%s = %s\n", alarm, get_alarmval(ald.alarm_state));

}

static int

set_alarm(const char *alarm, const char *alarmstate)

{

ts_aldata_t ald;

int alarmval = ALARM_OFF, altype = parse_alarm(alarm);

if (altype == ALARM_INVALID) { usage();

exit (1);

}

if (strcmp(alarmstate, "on") == 0) alarmval = ALARM_ON;

else

if (strcmp(alarmstate, "off") == 0) alarmval = ALARM_OFF;

else {

usage(); exit (1);

}

ald.alarm_no = altype; ald.alarm_state = alarmval;

if (lom_ioctl(LOMIOCALCTL, (char *)&ald) != 0) {

printf("Setting ALARM.%s to %s failed\n", alarm, alarmstate); return (1);

} else {

printf("Setting ALARM.%s successfully set to %s\n", alarm,

alarmstate);

return (1);

}

}

static int

parse_alarm(const char *alarm)

Appendix B Alarm Relay Output Application Programming Interface 73

Image 87
Contents Netra 440 Server System Administration Guide Page Contents Managing RAS Features and System Firmware Managing Disk Volumes Iv Netra 440 Server System Administration Guide August Figures Vi Netra 440 Server System Administration Guide August Tables Viii Netra 440 Server System Administration Guide August How This Book Is Organized PrefaceShell Prompts Using Unix CommandsRelated Documentation Typographic ConventionsSun Welcomes Your Comments Accessing Sun DocumentationThird-Party Web Sites Contacting Sun Technical SupportCommunicating With the System Configuring the System Console1Ways of Communicating With the System What the System Console Does Using the System ConsoleSerial MGT NET MGT Alom serial management port Alom network management port 3Alternative Console Ports Require Additional Configuration Alternative System Console ConfigurationAccessing the System Console Through a Graphics Monitor About the sc Prompt OpenBoot ok Prompt Access Through Multiple Controller SessionsReaching the sc Prompt Reaching the ok Prompt Alom System Controller break or console Command Graceful ShutdownL1-A Stop-A Keys or Break Key Manual System Reset Externally Initiated Reset XIRGetting to the ok Prompt For More InformationTo Get to the ok Prompt 2Ways of Accessing the ok PromptConsole # Using the Serial Management Port Accessing the System ControllerActivating the Network Management Port To Use the Serial Management PortEstablish an Alom system controller session To verify the network settings, type To Activate the Network Management PortLog out of the Alom system controller session To Access The System Console Through a Terminal Server Accessing the System Console Through a Terminal Server3Pin Crossovers for Connecting to a Typical Terminal Server Open a terminal session on the connecting device, and type Power on the system Accessing the System Console Through a TIP ConnectionA shell tool window on the Sun system, type To Access the System Console Through the TIP ConnectionOk power-off If the number displayed by the uname -rcommand is less than Modifying the /etc/remote FileTo Modify the /etc/remote File Netra 440 Server System Administration Guide August Ok setenv input-device ttyb ok setenv output-device ttyb Look for the following output Verifying Serial Port Settings on TtybTo Verify the Serial Port Settings on Ttyb Open a shell tool window TypeFor more information, see Getting to the ok Prompt on To cause the changes to take effect, type Output-device Ttya Ttyb Screen Input-device Keyboard System Console OpenBoot Configuration Variable SettingsNetra 440 Server System Administration Guide August Managing RAS Features and System Firmware Logging In To the Alom System Controller Alom System ControllerTo Log In To the Alom System Controller About the scadm UtilitySc showenvironment To View Environmental InformationTo turn on the Locator LED, do one of the following Controlling the Locator LEDTo turn off the Locator LED, do one of the following OpenBoot Emergency Procedures To Restore OpenBoot Configuration Defaults Stop-A FunctionalityStop-N Functionality Stop-D Functionality Automatic System RecoveryTo reset the system, type the following command Stop-F FunctionalityAuto-Boot Options Error Handling Summary To Enable Automatic System Recovery Reset ScenariosAutomatic System Recovery User Commands Enabling and Disabling Automatic System RecoveryTo Disable Automatic System Recovery To cause the parameter changes to take effect, typeTo cause the parameter change to take effect, type Unconfiguring and Reconfiguring Devices Obtaining Automatic System Recovery InformationTo Unconfigure a Device Manually To determine full physical device paths, type To Reconfigure a Device Manually Enabling the Hardware Watchdog Mechanism and Its Options To Enable the Hardware Watchdog MechanismMultipathing Software Disk Volumes Managing Disk VolumesVolume Management Software Veritas Dynamic MultipathingSun StorEdge Traffic Manager Managing Disk Volumes Disk Concatenation RAID TechnologyRAID 1 Disk Mirroring RAID 0 Disk StripingHardware Disk Mirroring RAID 5 Disk Striping With ParityHot-Spares C1t3d0 Devices/pci@1f,700000/scsi@2/sd@3,0 To Create a Hardware Disk MirrorFor example To Delete a Hardware Disk Mirror To delete the volume, type the following command To Perform a Mirrored Disk Hot-Plug Operation To confirm a failed disk, type the following commandTo Perform a Non-Mirrored Disk Hot-SwapOperation CD-ROM View the status of the Scsi devices# cfgadm -x removedevice c0dsk/c1t1d0 Remove the hard drive from the device treeVerify that the device has been removed from the device tree Configure the new hard driveVerify that the new hard drive is in the device tree OpenBoot Configuration Variables Baudrate, bits Appendix a OpenBoot Configuration Variables Netra 440 Server System Administration Guide August Alarm Relay Output Application Programming Interface Netra 440 Server System Administration Guide August Page Netra 440 Server System Administration Guide August Page Netra 440 Server System Administration Guide August Index SymbolsNetra 440 Server System Administration Guide August Asr-disable, 46 go Console, 11, 41 console -f, 9 poweroff, 12 poweron Uadmin 11 uname, 25 uname -r Netra 440 Server System Administration Guide August