C H A P T E R  3

Using the Command Line Interface

This chapter describes how to use the ILOM's Command Line Interface (CLI). The sections include:


3.1 Logging In To and Out Of CLI

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

The ILOM supports a maximum of 10 active sessions, including serial, SSH, and web interface sessions. You can view active sessions by entering the command show /SP/sessions.



Note - Telnet connections to the ILOM are not supported.



Logging In and Out Using SSH

1. Start your SSH client

2. To log in to the ILOM, type:

$ ssh root@SPipaddress

3. Type 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 Integrated Lights Out Manager
Version 1.0
Copyright 2006 Sun Microsystems, Inc. All rights reserved.
Warning: password is set to factory default.
->

4. To log out, type exit.

Logging In and Out Using the Serial Port

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 ILOM 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 ILOM.

You should see the following prompt:

SUNSP0003BA84D777 login:

4. Log in to the ILOM and type 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 ILOM as root, change the default password for increased security.



5. To log out, type exit.


3.2 Using CLI Commands

This section describes how to use CLI commands.

3.2.1 CLI Namespace

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 ILOM includes two namespaces: the /SP namespace, and the /SYS namespace.

You can view your /SYS namespace by typing the show /SYS command from the command line. FIGURE 3-1 shows the /SP namespace. The /SYS namespace is unique to each platform.


FIGURE 3-1 SP Namespace

Graphic showing block diagram of SP namespace.


3.2.2 Privilege Levels

The CLI provides two privilege levels: Administrator and Operator. Administrators have full access to ILOM functionality and Operators have read-only access to ILOM information.



Note - The default user, root, has administrator privileges. To create a user account with operator privileges, see Section 3.7.1, Adding a User Account.



CLI commands are case-sensitive.

3.2.3 CLI Command Syntax

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

The following sections describe each of these.

3.2.3.1 Command Verbs

The CLI supports the following command verbs.


TABLE 3-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.

load

Transfers a file from an indicated source to an indicated target.

reset

Resets the state of the target.

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 ILOM firmware running.


3.2.3.2 Command 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 3-2 Command 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.

-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.

-script

 

Skips warnings or prompts normally associated with the command.

-source

 

Indicates the location of a source image.


3.2.3.3 Command Targets

Every object in your namespace is a target. All targets are not supported for all commands. Section A.2, CLI Command Reference lists each command, with its targets and properties.

3.2.3.4 Command Properties

Properties are the configurable attributes specific to each object. An object can have one or more properties. Section A.2, CLI Command Reference lists each command, with its targets and properties.


3.3 Managing Access to ILOM

You can display or configure HTTP, HTTPS, and Secure Shell (SSH) services from the CLI. By default, HTTPS access is enabled.

ILOM is managed through the /SP namespace.

3.3.1 Displaying Access Settings

TABLE 3-3 shows the commands used to display access settings.


TABLE 3-3 Commands to Display Access Settings

Type this command...

to display this setting.

show /SP/services/http

HTTP

show /SP/services/https

HTTPS

show /SP/services/ssh/keys/dsa
show /SP/services/ssh/keys/rsa

SSH key


3.3.2 Configuring Access Settings

Use the set command to change properties and values for HTTP and HTTPS services.

3.3.2.1 Syntax

set target [propertyname=value]

3.3.2.2 Targets, Properties, and Values

TABLE 3-3 shows the valid targets, properties, and values for HTTP, HTTPS, and SSH services.


TABLE 3-4 Valid Targets, Properties and Values for HTTP, HTTPS and SSH

Target

Property

Value

Default

/SP/services/http

port

secureredirect

servicestate

<port number>

enabled|disabled

enabled|disabled

80

enabled

disabled

/SP/services/https

port

servicestate

<port number>

enabled|disabled

443

enabled

/SP/services/ssh/keys/dsa

fingerprint

length

publickey

 

 

/SP/services/ssh/keys/rsa

fingerprint

length

publickey

 

 


3.3.2.3 Examples

To configure automatic redirection from HTTP to HTTPS, type:

set /SP/services/http secureredirect=true

To change the HTTPS port to 445 type:

set /SP/services/https port=445


3.4 Managing the Host

You can use the ILOM to change the host's state and to access the host console.

3.4.1 Managing the Host State

To send a break to the host, type:

Escape + B (press the Escape key and type upper case B).

To power on the host, type:

start /SYS

To power off the host, type:

stop /SYS

To reset the host, type:

reset /SYS



Note - Entering reset /SYS does not affect the power state of the host.



3.4.2 Managing the Host Console

Type the following command to start a session to the server console:

start /SP/console

Type the following command to terminate a server console session started by another user:

stop /SP/console

3.4.3 Viewing Host Sensors

Host systems are equipped with sensors that show 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 sensors. Use the command:

show /SYS/sensor

where sensor is a particular sensor. For example, the following command shows the state of sensor /PROC/P0:


-> show /SYS/PROC/P0
/SYS/PROC/P0
    Targets:
    Properties:
        T_CORE = 7700.000000 RPM
        V_+1V25 = 1.404000 Volts
        V_+1V5 = 45.000000 degrees C
        V_+2V5 = 7800.000000 RPM
    Commands:
        cd
        show

For more information about sensors, including how to view them using the WebGUI, see Section 5.5, Viewing Temperature, Voltage, and Fan Sensor Readings

For details on individual sensors, see your platform supplement.


3.5 Managing ILOM Network Settings

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

3.5.1 Displaying Network Settings

Type the following command to display network settings:

show /SP/network

3.5.2 Configuring Network Settings

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

Network settings have two sets of properties: pending and active. The active settings are the settings currently in use by the ILOM. These settings are read-only. If you want to change settings, enter the updated settings as the pending settings (pendingipaddress or pendingipgateway), then set the commitpending property to true. This prevents accidental disconnections for both port and network settings.



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



3.5.2.1 Syntax

set target [propertyname=value]

3.5.2.2 Targets, Properties, and Values

The following targets, properties, and values are valid for ILOM network settings.


TABLE 3-5 ILOM Network Targets, Properties and Values

Target

Property

Value

Default

/SP/network

commitpending

pendingipaddress

pendingipdiscovery

pendingipgateway

pendingipnetmask

true|(none)

<ipaddress|none>

dhcp|static

<ipaddress|none>

<ipdotteddecimal>

(none)

none

dhcp

none

255.255.255.255


Examples

To change the IP address for the ILOM, type:

-> set /SP/network ipaddress=nnn.nn.nn.nn commitpending=true



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



To change the network settings from DHCP to static assigned settings, type:

-> set /SP/network pendingipdiscovery=static pendingipaddress=nnn.nn.nn.nn pendingipgateway=nnn.nn.nn.nn pendingipnetmask=nnn.nn.nn.nn commitpending=true


3.6 Managing ILOM Serial Port Settings

You can display or configure the ILOM serial port settings from the CLI. The ILOM has two serial ports: an internal host port that interfaces directly with the host server using the start /SP/console command, and an external port that is exposed on back of the server.

3.6.1 Displaying Serial Port Settings

Type the following command to display settings for the external serial port:

show /SP/serial/external

Type the following command to display settings for the host serial port:

show /SP/serial/host

3.6.2 Configuring Serial Port Settings

Use the set command to change properties and values for serial port settings. Port settings have two sets of properties: pending and active. The active settings are the settings currently in use by the ILOM. These settings are read-only. If you want to change settings, enter the updated settings as the pending settings, then set the commitpending property to true. This prevents accidental disconnections for both port and network settings.

3.6.2.1 Syntax

set target [propertyname=value]

3.6.2.2 Targets, Properties, and Values

The following targets, properties, and values are valid for ILOM serial ports.


TABLE 3-6 Valid Targets, Properties and Values for ILOM Serial Ports

Target

Property

Value

Default

/SP/serial/external

commitpending

flowcontrol

pendingspeed

speed

true|(none)

none

<decimal>

9600

(none)

none

9600

9600

/SP/serial/host

commitpending

pendingspeed

speed

true|(none)

<decimal>

9600

(none)

(none)

9600


Example

To change the speed (baud rate) for the host serial port from 9600 to 57600, type:

-> set /SP/serial/host pendingspeed=56000 commitpending=true



Note - The speed of the host serial port must match the speed setting for serial port 0, COM1, or /dev/ttys0 on the host operating system for the ILOM to communicate properly with the host.




3.7 Managing User Accounts

This section explains how to add, modify and delete ILOM user accounts.

The ILOM 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.



caution icon

Caution - The ILOM includes a user account "sunservices," which shares the ILOM root password. Normally, it is used exclusively by Sun Service personnel; however it can also be used to perform recovery procedures documented in the product notes. Incorrect use of this account can corrupt the service processor image or operations.



The roles include:

Operators cannot:

3.7.1 Adding a User Account

Type the following command to add a local user account:

create /SP/users/username password=password role=administrator|operator

3.7.2 Deleting a User Account

Type the following command to delete a local user account:

delete /SP/users/username

3.7.3 Displaying User Accounts

Type the following command to display information about all local user accounts:

show /SP/users

3.7.4 Configuring User Accounts

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

3.7.4.1 Syntax

set target [propertyname=value]

3.7.4.2 Targets, Properties, and Values

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


TABLE 3-7 Valid Targets, Properties and Values for Local User Accounts

Target

Property

Value

Default

/SP/users/username

permissions

password

administrator|operator

<string>

operator


Examples

When changing the role for user1 from Administrator to Operator type:

-> set /SP/users/user1 role=operator

To change user1's password type:

-> set /SP/users/user1 password

Changing password for user /SP/users/user1/password...

Enter new password:********

Enter new password again:********

New password was successfully set for user /SP/users/user1



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




3.8 Managing ILOM Alerts

The system is equipped with a number of sensors that measure voltages, temperatures and other things. ILOM polls the sensors and posts an event in the event log (SEL) when they cross a threshold. Some of these readings are also used to perform actions such as adjusting fan speeds, illuminating LEDs and powering off the chassis.

The alert management view allows you to configure the system to send alerts to IP addresses.



caution icon

Caution - The ILOM tags all events or actions with LocalTime=GMT (or UDT). Browser clients show these events in LocalTime. This can cause apparent discrepancies in the event log. When an event occurs on the ILOM, the event log shows it in UDT, but a client would show it local time.



An alert is an IPMI Platform Event Trap (PET) generated when a sensor crosses the specified threshold. For example, if you configure an alert for critical thresholds, the ILOM sends an IPMI trap to the specified destination when any sensor crosses the upper or lower critical (CT) threshold.

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

A special criteria, informational, is reserved for system events that are not related to sensors.

3.8.1 Displaying Alerts

Type the following command to display alerts:

show /SP/alert/rules

3.8.2 Configuring Alerts

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

3.8.2.1 Syntax

set target [propertyname=value]

3.8.2.2 Targets, Properties, and Values

The following targets, properties, and values are valid for IPMI PET alerts.


TABLE 3-8 Valid Targets, Properties and Values for IPMI Pet Alerts

Target

Property

Value

Default

/SP/alert/rules/1...15

destination

level

<ipaddress>

disable|information|warning|
critical|non-recoverable

(none)

disable


The parameters are:

Examples

To configure an alert, type:

-> set /SP/alert/rules/1 destination=128.145.77.21 level=critical

To change an alert level to critical, type:

-> set /SP/alert/rules/1 level=critical

To turn off an alert, type:

-> set /SP/alert/rules/1 level=disable


3.9 Managing Clock Settings

You can display clock settings or configure your clock to synchronize with one or two Network Time Protocol (NTP) servers. If you do not configure an NTP server, the time is set by the system BIOS.

3.9.1 Displaying Clock Settings

Type the following command to display clock settings:

show /SP/clock

3.9.2 Configuring the Clock to Use NTP Servers

Use the set command to change properties and values for NTP servers.

3.9.2.1 Syntax

set target [propertyname=value]

3.9.2.2 Targets, Properties, and Values

The following targets, properties, and values are valid for NTP servers.


TABLE 3-10 Valid Targets, Properties and Values for NTP Servers

Target

Property

Value

Default

/SP/clients/ntp/server/1

address

<ipaddress>

(none)

/SP/clients/ntp/server/2

address

<ipaddress>

(none)


Example

To configure your clock to synchronize with an NTP server, type:

-> set /SP/clients/ntp/server/1 address=125.128.84.20

Then enable the NTP service by typing:

-> set /SP/clock/usentpserver=enabled



Note - Once you enable the NTP service, it can take up to five minutes for the clock to synchronize.




3.10 Displaying ILOM Information

You can display active session, current versions, and other information about the ILOM using the CLI. TABLE 3-11 shows the commands and the information they display.


TABLE 3-11 Commands To Display ILOM Information

Command

Displays...

version

The current ILOM version

show /SP/cli/commands

All of the CLI commands

show /SP/sessions

All active sessions

help targets

Available valid targets


3.10.1 Displaying Version Information

Type the following command to display the current ILOM version:

3.10.2 Displaying Available Targets

Type the following command to display the available valid targets:

help targets


3.11 Updating the ILOM Firmware

You can use CLI to update the ILOM firmware. Updating the ILOM from the command line enables you to update both the ILOM firmware and the BIOS at the same time. See Section A.2.6, Using the load Command for more information.



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 ILOM could be left in an unbootable state.





caution icon

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





Note - The upgrade takes about five minutes to complete. During this time, no other tasks can be performed in the ILOM.



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

2. Type the following command to update the ILOM firmware:

load -source URL



Note - A network failure during the file upload will result in a time-out. This causes the ILOM to reboot with the prior version of the ILOM firmware.



Example:

 -> load -source tftp://archive/newmainimage
Are you sure you want to load the specified file (y/n)? y
File upload is complete.
Firmware image verification is complete.
Do you want to preserve the configuration (y/n)? n
Updating firmware in flash RAM: 
.
Firmware update is complete.
ILOM will not be restarted with the new firmware.