C H A P T E R 7 |
Using the Command-Line Interface |
This chapter describes how to use the Embedded Lights Out Manager command-line interface (CLI). The sections include:
You can access the command-line interface through the serial port or over the Ethernet.
The server ELOM supports a maximum of 10 active sessions, including serial, SSH, and web interface sessions. Telnet connections to the ELOM are not supported.
The CLI architecture is based on a hierarchical namespace, which is a predefined tree that contains every managed object in the system. This namespace defines the targets for each command verb.
The Embedded Lights Out Manager (ELOM) software includes the /SP and /SYS namespaces.
The /SP namespace manages the ELOM, which allow you to manage users, clock settings, and other issues.. The children of this namespace are /user, /network, /clock, /AgentInfo, /TftpUpdate, and /CPLDUpdate.
The /SYS namespace monitors the ELOM, which allows you to display and view critical and system-specific information. The children of this namespace include /BoardInfo, /ProductInfo, /ChassisInfo, /CtrlInfo, /CPU, /MemModule, /Fan, /Temperature, and /Voltage
The CLI provides four privilege levels: administrator, operator, user, and callback. The administrator privilege allows full read and write access to ELOM functionality. The operator privilege has limited write access. The user, and callback privileges have read-only access to the ELOM.
Note - The default user, root, has administrator privileges. For information about how to create a user account with user privileges, see Adding a User Account Using the CLI. |
CLI commands are case-sensitive.
The syntax of a command is verb options target properties.
TABLE 7-1 describes the CLI command verbs.
The CLI supports the following options. Not all options are supported for all commands. See a specific command section for the options that are valid with that command. The -help and -examine options can be used with any command.
Every object in your namespace is a target. Not all targets are supported for all commands. Each command section lists the valid targets for that command.
Properties are the configurable attributes specific to each object. An object can have one or more property. Each command section lists the valid properties for each target.
You can use the ELOM to change the host’s state and to access the host console.
set /SYS/CtrlInfo PowerCtrl=on
set /SYS/CtrlInfo PowerCtrl=graceful_off
set /SYS/CtrlInfo PowerCtrl=off
set /SYS/CtrlInfo PowerCtrl=reset
set /SYS/CtrlInfo PowerCtrl=BIOSSetup
set /SYS/CtrlInfo BootCtrl=PCCheck_enable
To start a session to the server console, enter this command:
To revert to CLI once the console has been started, press Esc-Shift-9 keys.
To terminate a server console session started by another user, enter this command:
Host systems are equipped with sensors that monitor the state of critical components. For example, they record things like temperatures, voltages, and fan speeds. The show command can be used to show the state of the critical components. Use the command:
component The name of the critical component.
For example, the following command shows the state of CPU 0:
For more information about sensors, including how to view them using a web browser, see Monitoring the System Sensors.
You can display or configure the ELOM network settings from the CLI.
To Display Network Settings |
Use the show command in the /SP/network namespace:
show /SP/network (This will display all network settings.)
To Configure Network Settings |
Use the set command to change properties and values for network settings.
These targets, properties, and values are valid for ELOM network settings.
192.168. last 2 digits of MAC address |
To change the IP address for the ELOM, Enter:
Note - Changing the IP address will disconnect your active session if you are connected to the ELOM via a network. |
set /SP/network IPAddress=n.n.n.n
set /SP/network Gateway=n.n.n.n
set /SP/network DNS=n.n.n.n
set /SP/network IPSource=[static|dhcp]
This section describes how to add, modify, and delete user accounts using the CLI.
The ELOM supports up to 10 user accounts. One of those, root, is set by default and cannot be removed. Therefore, you can configure 9 additional accounts.
Each user account consists of a user name, a password, and a permission.
set username Permission=[administrator|operator|user]
To Add a User Account Using the CLI |
You are prompted for a password.
The username must be 4-20 characters long, and passwords must be a minimum of eight characters long.
To Display User Accounts Using the CLI |
Use the set command to change passwords and permissions for configured user accounts.
Note - You must have administrator privileges to change user properties. |
set target [propertyname=value]
These targets, properties, and values are valid for local user accounts.
When changing the permissions for user1 from administrator to operator Enter:
set /SP/users/user1 Permission=operator
To change user1's password Enter:
set /SP/users/user1 password=password
The system is equipped with sensors that read several system critical parameters, such as voltages and temperatures. The system monitors these sensors and creates an alert when a sensor reading crosses an upper or lower critical threshold level (for more information, see Configuring Platform Event Filters).
You can manage these alerts, by using the CLI to create filters that trap alerts based on the sensor type. You can then have the filters perform various preconfigured actions in response to the alert. Configuring alerts with the CLI is a two step process. First, configure a destination IP address in the PET. Second, configure a platform event filter (PEF) to enable and perform various alert-triggered actions.
You manage alerts from the /SP/AgentInfo namespace, using the show and set commands. The show command allows you to display current alert property and value settings. The set command allows you to configure alert property and value settings.
Use the show command to display PET and PEF targets, properties, and values.
To Display Alerts |
To display targets, properties, and target commands for PET, enter the following command:
To display targets, properties, and target commands for PEF, enter the following command:
Before configuring alerts, you might want to display a target’s current settings. This allows you to examine the current status of alerts. Use the cd command and the show command, respectively, to navigate to targets and display property values. For example:
The output of the show command appears:
/SP/AgentInfo/PET Targets: Destination1 Destination2 Destination3 Destination4 Properties: CommunityString = public Target Commands: show cd set |
To Display PET Target Properties |
To display properties, enter the following commands:
/SP/AgentInfo/PET -> cd Destination1
The result of executing the show command for the target, Destination1 appears:
/SP/AgentInfo/PET/Destination1 Targets: Properties: IPAddress = 10.5.157.112 Target Commands: show set |
The first step to configuring alerts is to configure the PET IP address. After you configure the IP address, you need to configure the individual PEF filter tables. Filter tables are where you designate the specific alert-triggered actions
Use the set command to configure alerts in PET and PEF:
This target, property, and value is valid when using the set command to set the IPMI PET IP address:
To Configure the PET IP Address |
To set the IP address for Destination1, enter the following commands:
-> cd /SP/AgentInfo/PET/Destination1
/SP/AgentInfo/PET/Destination1 -> set IPAddress=xxx.xxx.xxx.xxx
Repeat the above set command to configure the IP address for additional destination targets.
PEF Global Controls allow you to enable PEF actions globally. These settings override settings in the PEF filter table. These targets and properties are valid for configuring the gobal PEF controls:.
To Configure the PEF Global Controls |
1. To configure the PEF global controls, you must first enable global control by entering the following commands:
/SP/AgentInfo/PEF -> set PEFGlobalCtrl=enable
After enabling global control, you can enable global control for specific actions.
2. To enable global PEF control for a specific action, enter the following commands for each PEFActionGlobalCtrl that you want to enable:
Note - This example shows how to enable the power reset PEF global action: |
/SP/AgentInfo/PEF -> set PEFActionGlobalCtrlPowerReset=enable
The event filter table is where you designate the specific altert-triggered actions. You can configure up to six event filter tables. These targets, properties, and values are valid for setting the PEF:
To Configure the Event Filter Tables |
1. To configure a PEF EventFilterTable target, enter the following commands:
The result of executing the show command appears:
By examining the output of the show command, you can view the current global control configuration. If necessary use the cd and show commands to navigate to and examine the individual event filter table targets. You will need to decide which table you are going to configure.
2. When you have decided which EventFilterTable to configure, enable the table by entering the following commands:
Note - This example uses EventFilterTable1. |
/SP/AgentInfo/PEF -> cd EventFilterTable1
/SP/AgentInfo/PEF/EventFilterTable1-> set status=enable
3. Display EventFilterTable1 by entering the following command:
/SP/AgentInfo/PEF/EventFilterTable1-> show
The result of executing the show command appears:
Next, set the sensor type. There are six values for the sensor type: All, Memory, Processor, Temperature, Voltage, and Fan.
4. Use the set command to configure the sensor type.
For example, to set the temperature sensor, enter:
/SP/AgentInfo/PEF/EventFilterTable1-> set sensortype=Temperature
5. Enable the properties or triggered actions for the sensor.
6. Use the set command to enable (or disable) actions. For example, to set the sendalert and sendmail actions, enter:
/SP/AgentInfo/PEF/EventFilterTable1-> set sendalert=enable
/SP/AgentInfo/PEF/EventFilterTable1-> set sendmail=enable
7. When you are finished, use the show command to verify the PEF configuration:
/SP/AgentInfo/PEF/EventFilterTable1-> show
The output from the command appears:
In the example above, EventFilterTable1 is enabled to activate the SendAlert and SendMail actions, based on temperature related alerts.
You can display active session, current versions, and other information about the SP using the CLI.
To display the current SP version, enter the following command:
You can use CLI to update the SP firmware. Updating the ELOM from the command line enables you to update both the SP firmware and the BIOS at the same time. If you are using the CLI to update the firmware, a TFTPServer is required.
To Update the Firmware |
Note - The upgrade takes about 5 minutes to complete, depending on network traffic. During this time, no other tasks can be performed in the Embedded Lights Out Manager software. |
1. Copy the combined image from the Tools and Driver CD to your TFTP server.
The image is located in the /remoteflash directory.
2. If the server OS is running, perform a clean shutdown.
3. Log in to the CLI and change to the TftpUpdate directory:
Note - A network failure during the file upload will result in a timeout. This causes the SP to reboot with the prior version of the firmware. |
4. Enter the following command to set the IP address of the TFTP server:
/SP/TftpUpdate -> set ServerIP=n.n.n.n
n.n.n.n The server IP address.
5. Enter the following command to set the file name of the combined bmc.bios image:
/SP/TftpUpdate ->set Filename=filename
filename The name of the file in the /remoteflash directory (for example: x4150-10_3A01)
a. To update the firmware, enter one of the following commands:
/SP/TftpUpdate -> set BIOSCMOS=notsave
Note - A hardware procedure for clearing the NVRAM is available in the server service manual. |
/SP/TftpUpdate -> set BIOSCMOS=save
/SP/TftpUpdate -> set Update=action
After you enter this command, the system displays the current firmware version and the upgrade version and prompts for confirmation.
7. Select Yes to continue, or No to exit.
Copyright © 2008, Sun Microsystems, Inc. All Rights Reserved.