C H A P T E R  8

Using the Command-Line Interface

This chapter describes how to use the embedded lights out manager command-line interface (CLI). The sections include:


Logging In to the CLI

You can access the command line through the serial port or over the Ethernet.

The embedded lights out manager (Embedded LOM) supports a maximum of 10 active sessions, including serial, SSH, and web interface sessions.



Note - Telnet connections to the ELOM are not supported.



procedure icon  To Log In Using SSH

This section describes how to log in to the service processor using secure shell.

1. Start your SSH client.

2. To log into the ELOM, enter:

$ ssh root@SPipaddress

3. Enter your password when prompted.



Note - The default user name is root, and the default password is changeme.


For example:

$ ssh root@192.168.25.25

root@192.168.25.25's password:

Sun (TM) Embedded Lights Out Manager

Version 1.0

Copyright 2006 Sun Microsystems, Inc. All rights reserved.

Warning: password is set to factory default.

/SP ->


procedure icon  To Log In From the Serial Port

This section describes how to log in to the service processor from the serial port using a terminal device.

1. Configure your terminal device or the terminal emulation software running on a laptop or PC to the following settings:

2. Connect a serial cable from the server RJ-45 Serial Mgt port to a terminal device.

3. Press ENTER on the terminal device to establish a connection between that terminal device and the SP.

You should see the following prompt:

SP -> SUNSP0016364A9934 login:

4. Log in to the SP, and enter the user name and password.

The default user name is root, and the default password is changeme.



Note - Once you have logged in to the SP as root, change the default password for increased security.




Note - If you have changed the serial redirection output in the system BIOS from BMC (that is, from the SP) to system, the system output will be displayed on the serial connection. To view the SP output on the serial connection, change the system BIOS back to the default BMC.



Command Syntax

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 software includes the /SP namespace.

The /SP namespace manages the embedded lights out manager. Children of this namespace are /AgentInfo and /SystemInfo which allow you to use this space to manage users, clock settings, and other issues.

The CLI provides two privilege levels: Administrator and User. Administrators have full access to ELOM functionality and users have read-only access to information.



Note - The default user, root, has administrator privileges. To create a user account with user privileges, see To Add a User Account.


CLI commands are case-sensitive.

Syntax

The syntax of a command is: <verb><options><target><properties>

Command Verbs

TABLE 8-1 describes the CLI command verbs.


TABLE 8-1 CLI Command Verbs

Command

Description

cd

Navigates the object namespace.

create

Sets up an object in the namespace.

delete

Removes an object from the namespace.

exit

Terminates a session to the CLI.

help

Displays Help information about commands and targets.

set

Sets target properties to the specified value.

show

Displays information about targets and properties.

start

Starts the target.

stop

Stops the target.

version

Displays the version of the ELOM firmware that is running.


 

Options

The CLI supports the following options. All options are not 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.


TABLE 8-2 CLI Options

Option Long Form

Short Form

Description

-default

 

Causes the verb to perform only its default functions.

-destination

 

Specifies the destination for data.

-display

-d

Shows the data the user wants to display.

-examine

-x

Examines the command but does not execute it.

-force

-f

Causes an immediate action instead of an orderly shutdown.

-help

-h

Displays Help information.

-keep

-k

Establishes a holding time for command job ID and status.

-level

-l

Executes the command for the current target and all targets contained through the level specified.

-output

-o

Specifies the content and form of command output.

-resetstate

 

Indicates to what target-specific state to reset the target.

-script

 

Skips warnings or prompts normally associated with the command.

-source

 

Indicates the location of a source image.


Targets

Every object in your namespace is a target. All targets are not supported for all commands. Each command section lists the valid targets for that command.

Properties

Properties are the configurable attributes specific to each object. An object can have one or more properties. Each command section lists the valid properties for each target.


Managing the Host

You can use the ELOM to change the host's power state, and to access the host console.


procedure icon  To Manage the Host Power State

single-step bullet  To power on the host, enter the following command:

-> set /SP/SystemInfo/CtrlInfo PowerCtrl=on

single-step bullet  To power off the host gracefully, enter the following command:

-> set /SP/SystemInfo/CtrlInfo PowerCtrl=gracefuloff

single-step bullet  To power off the host forcefully, enter the following command:

-> set /SP/SystemInfo/CtrlInfo PowerCtrl=forceoff

single-step bullet  To reset the host, enter the following command:

-> set /SP/SystemInfo/CtrlInfo PowerCtrl=reset

single-step bullet  To reboot and enter the BIOS automatically, enter the following command:

-> set /SP/SystemInfo/CtrlInfo BootCtrl=BIOSSetup


procedure icon  To Manage the Host Console

single-step bullet  To start start a session on the server console, enter this command:

-> start /SP/AgentInfo/console



Note - After running the start command, no output will be displayed until the server is rebooted.


single-step bullet  To revert to CLI once the console has been started:

Press Esc-Shift-9 keys

single-step bullet  To terminate a server console session started by another user, enter this command:

-> stop /SP/AgentInfo/console


procedure icon  To View Host Sensors

Host systems are equipped with sensors that show the state of critical components. For example, the sensors allow you to monitor temperatures, voltages, and fan speeds. The show command can be used to show the state of sensors.

single-step bullet  To view the host sensors

-> show /SP/SystemInfo/CPU/sensor

where sensor is the sensor name.
For example, the following command shows the state of sensor /CPU/CPU0:

show /SP/SystemInfo/CPU/CPU0

For more information about sensors, including how to view them using the web-based interface, see Using the System Monitoring Screens.

For details on individual sensors, see your platform supplement.


Managing the ELOM Network Settings

You can display or configure the ELOM network settings from the CLI.


procedure icon  To Display Network Settings

single-step bullet  Enter the following command to display network settings:

show /SP/AgentInfo

Configuring Network Settings

Use the set command to change properties and values for network settings.



Note - Ensure that the same IP address is always assigned to an ELOM by either assigning a static IP address to your ELOM after initial setup, or configuring your DHCP server to always assign the same IP address to the ELOM. This enables the ELOM to be easily located on the network.


Syntax

set /SP/AgentInfo IpAddress=xxx.xxx.xxx.xxx

Targets, Properties, and Values

These targets, properties, and values are valid for the ELOM network settings.


TABLE 8-3

Target

Property

Value

Default

/SP/AgentInfo

IpAddress

 

DhcpConfigured

Gateway

Netmask

iIP address|none

 

enabled|disabled

iIP address|none

IP address format

192.168.Last 2 digits of MAC address

enabled

none

255.255.255.0


Examples

single-step bullet  To change the IP address for the ELOM, enter:

-> set /SP/AgentInfo IpAddress=xxx.xxx.xxx.xxx



Note - Changing the IP address will disconnect your active session if you are connected to the ELOM via a network.


single-step bullet  To set the Gateway address for the ELOM, enter:

-> set /SP/AgentInfo Gateway=xxx.xxx.xxx.xxx

single-step bullet  To change the network settings from static to DHCP settings, enter:

-> set /SP/AgentInfo DhcpConfigured=enable

single-step bullet  To disable DHCP network settings, enter:

-> set /SP/AgentInfo DhcpConfigured=disable


Managing User Accounts

This section describes how to add, modify, and delete user accounts from the CLI.

The ELOM supports up to 10 user accounts. Two of those, root and anonymous, are set by default, and cannot be removed. Therefore, you can configure eight additional accounts.

Each user account consists of a user name, a password, and a role.

The roles include:

The syntax is:

set Permission=[Administrator|Operator|User]


procedure icon  To Add a User Account

single-step bullet  To add a local user account, enter the following command:

-> create /SP/User username

Then change to the User directory:

-> cd User /SP/User/username

-> set /SP/user/username Password=password


procedure icon  To Delete a User Account

single-step bullet  To delete a local user account, enter the following command:

-> delete /SP/User/username


procedure icon  To Display User Accounts

single-step bullet  To display information about all local user accounts, enter the following command:

show /SP/User

Configuring User Accounts

Use the set command to change passwords and permissions for configured user accounts.



Note - You must have Administrator privileges to change user properties.


Syntax
set target propertyname=value
Targets, Properties, and Values

These targets, properties, and values are valid for local user accounts.


TABLE 8-4

Target

Property

Value

Default

/SP/User/username

Permission

 

Password

[Administrator|Operator|User]

string

Operator


Examples

single-step bullet  To change the permissions for user1 from Administrator to Operator enter:

-> set /SP/User/user1 Permission=Operator

single-step bullet  To change user1's password enter:

-> set /SP/users/user1 Password=string


Resetting the SP Password

You might need to reset the Service Processor password to the original factory default for any number of reasons including a user forgetting the password.


procedure icon  To Reset the SP Password

1. Press F2 to enter the BIOS.

2. Under the Advanced tab point to Ipmi 2.0 Configuration.

3. Choose Reset BMC Root Password.

4. To save and exit changes, click OK.

The BMC (SP) password is reset to the default changeme.


Managing Alerts

The system is equipped with a number of strategically placed sensors. The service processor (SP) uses these sensors to monitor critical system parameters for certain key components, such as, power supplies (voltages), CPUs (temperature), and fans (RPM). For the SP to operate efficiently, the components being monitored must perform within a specific range. The SP continually monitors each sensor to see if it is within its range. When a component exceeds its range, the SP generates an alert and posts an event in the system event log (SEL).



Note - All alerts are IPMI PEF traps, as defined in the Intelligent Platform Management Interface (IPMI) v2.0.


You can define which alerts the SP will report. This entails using the Platform Event Traps (PET) and the Platform Event Filters (PEF) to configure alerts to respond to certain rules. You can also configure a destination IP address for the alert. For example, you can configure the SP to send an IPMI trap to a specified destination when any sensor crosses the upper or lower critical temperature (CT) threshold.



Note - The Informational alert level, is reserved for system events that are not related to sensors.


Displaying Alerts

Use the show command to display current configurations or to verify changes.

Syntax

set target propertyname=value

Enter the following command to display alerts:

show /SP/AgentInfo/PET/Destination[1...4]

show /SP/AgentInfor/PEF

show /SP/AgentInfo/PEF/EventFilterTable[1...6]

Configuring Alerts

Use the set command to change values for properties and configure alerts.

Syntax

set target propertyname=value

Targets, Properties, and Values

These targets, properties, and values are valid for PET alerts.


TABLE 8-5 PET Targets, Properties, Values, and Defaults

Target

Property

Value

Default

/SP/AgentInfo/PET/[Destination1...Destination4]

IPAddress

MACAddress

Status

IP address

MAC Address

enable|disable

(none)

(none)

disable


Examples

single-step bullet  To configure an alert for Destination1, enter:

-> set /SP/AgentInfo/PET/Destination1=128.145.77.21 Status=enable

single-step bullet  To turn off Destination1 alert, enter:

-> set /SP/AgentInfo/PEF/Destination1 Status=disable

Targets, Properties, and Values

These targets, properties, and values are valid for PEF alerts.


TABLE 8-6 Platform Event Filter Table Properties

Targets

Property

Value

Default

EventFilterTable[1...6]

PEFGlobalCtrl

PEFActionGlobalCtrlPowerOff

PEFActionGlobalCtrlPowerCycle

PEFActionGlobalCtrlPowerReset

PEFActionGlobalCtrlAlert

PEFActionGlobalCtrlMail

PEFActionGlobalCtrlInterrupt

enable|disable

enable|disable

enable|disable

enable|disable

enable|disable

enable|disable

enable|disable

disable

disable

disable

disable

disable

disable

disable


Examples

single-step bullet  To enable global control of PEF actions, enter the following commands:

-> cd /SP/AgentInfo/PEF

-> set PEFGlobalCtrl=enable

single-step bullet  To enable global control for individual actions, such as power cycle, enter:

-> set PEFActionGlobalCtrlPowerCycle=enable

single-step bullet  To enable global control for individual actions, such as mail, enter:

-> set PEFActionGlobalCtrlMail=enable

single-step bullet  To disable global control for mail, enter:

-> set PEFActionGlobalCtrlMail=disable

Targets, Properties, and Values

These targets, properties, and values are valid for PET event filter tables.


TABLE 8-7 PEF Table Target Properties

Property

Value

Status

enable|disable

SensorType

all, temperature, voltage, fan, processor, memory

PowerCtrl

enable|disable

DiagnosticInterrupt

enable|disable

SendAlert

enable|disable

SendMail

enable|disable


Examples

single-step bullet  To configure EventFilterTable1 to filter all sensors and enable all actions, enter the following commands:

-> cd /SP/AgentInfor/PEF/EventFilterTable1

-> set Status=enable

-> set SensorType=all

-> set PowerCtrl=enable

-> set DiagnosticInterrupt=enable

-> set SendAlert=enable

-> set SendMail=enable


Updating the Firmware

You can use CLI to update the SP firmware. Updating the ELOM from the command line enables you to update both the firmware and the BIOS at the same time.


procedure icon To Update the Firmware



caution icon Caution - Ensure that you have reliable power before upgrading your firmware. If power to the system fails (for example, if the wall socket power fails or the system is unplugged) during the firmware update procedure, the SP could be left in an unbootable state.




caution icon Caution - Shut down your host operating system before proceeding. Otherwise the SP will shut the host down ungracefully, which could cause file system corruption.




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 bios/bmc image to your Tftp server.

2. If the server OS is running, perform a clean shutdown.

3. Log in to the CLI, and change to the TftpUpdate directory:

cd TftpUpdate



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:

set ServerIPAddress=129.148.53.204

5. Enter the following command to set the file name of the combined bmc.bios image:

set FileName=X2100_96_2a10

a. To set the update method to overwrite existing customizations, enter:

set UpdateMethod=ClearCMOS

This is the default method; it clears the CMOS and overwrites all customized BIOS settings.

b. To set the update method to preserve existing customizations, enter:

set UpdateMethod=PreserveCMOS

This method preserves the CMOS settings.

6. Start the tftp download:

set Update=action

Example:
/SP ->cd TftpUpdate
/SP/TftpUpdate ->set ServerIPAddress=129.148.53.204 
/SP/TftpUpdate ->set FileName=X2100_96_2a10
/SP/TftpUpdate -> set Update=action 
getting image...
getting image successfully.
prepare to update...
Prepare OK!
Update Successful
starting update...

procedure icon  To Display Version Information

single-step bullet  To display the current SP version, enter the following command:

-> version

Example
SM CLP Version v1.0.0
SM ME Addressing Version v1.0.0