C H A P T E R  7

Using the scadm Utility

This chapter introduces the System Controller Administration (scadm) utility, and shows how to use it in managing the system. The chapter consists of:


Overview of the scadm Utility

The System Controller Administration (scadm) utility, which is part of the Solaris Operating System, enables you to perform many ALOM tasks while logged in to the host server.

The scadm commands control several functions, and some allow you to view or set ALOM environment variables. See List of scadm Commands for an overview of the commands, and Using ALOM Configuration Variables for an explanation of configuration variables.

You must be logged in to the host as superuser before you can use the scadm utility.



Note - The scadm utility does not work when you are running SunVTStrademark software on the server.



The scadm utility sends its output to stdout. You can use scadm in scripts to manage and configure ALOM from the host system. See Creating a Script to Send Alerts From ALOM.

For more information about the scadm utility, refer to the scadm man page. Type man scadm at the system prompt. The man page for scadm comes with your version of the Solaris Operating System.


procedure icon  To Get Started With the scadm Utility

1. Set your path to the scadm utility.

See To Set Your Path to the scadm Utility.

2. Log in to the host system as superuser.

3. Type scadm at the superuser prompt, and then type the command you want to use.

See List of scadm Commands



Note - The scadm utility does not work when you are running SunVTS software on the server.



Related Information

List of scadm Commands


procedure icon  To Set Your Path to the scadm Utility

To set your path to the scadm utility, perform these two steps:

1. Find out the proper platform name for your system.

See To Find Your System's Platform Name.

2. Set the path to scadm on your system.

Refer to your Solaris Operating System documentation for more information about how to set the path. The procedure differs depending on which command shell you are using in the Solaris Operating System, as well as which file you want to use to contain path information.

The scadm utility resides in the following directory:


/usr/platform/platform-name/sbin 

Where platform-name is the platform name for your system.


procedure icon  To Find Your System's Platform Name

single-step bulletAt the system prompt, type uname -i.

The system returns a result similar to the following:


% uname -i 
SUNW,servermodel

Where servermodel is the your server model. The default installation directory for the ALOM software will be in the following directory:

/usr/platform/SUNW,servermodel/sbin

Where servermodel is the your server model.

For example, if your server model is a Sun Fire V440 server, you would see the following output from the uname -i command:


% uname -i 
SUNW,Sun-Fire-V440

and the default installation directory for the ALOM software would be in:

/usr/platform/SUNW,Sun-Fire-V440/sbin

Related Information


List of scadm Commands

The scadm commands provide equivalent functionality to that of the ALOM commands.

Summary of scadm Commands

The following list describes the commands for the scadm utility.


TABLE 7-1 List of scadm Commands

Command

Description

See:

scadm consolehistory [-a]

For Sun Fire V215, V245, or V445 servers only, displays the SC console log.

scadm date

scadm date

Displays the date and time.

scadm date

scadm download

For Sun Fire V215, V245, or V445 servers, downloads alomfw to the ALOM flash PROM.

For all other servers, downloads alommainfw and alombootfw to the ALOM flash PROM.

scadm download

scadm fruhistory [-a]

For Sun Fire V215, V245, or V445 servers only, shows the SC FRU log.

scadm fruhistory

scadm help

Displays a list of scadm commands and brief descriptions and syntax for each command.

scadm help

scadm loghistory [-a]

Displays the events logged in the ALOM event buffer.

scadm loghistory

scadm modem_setup

Communicates with the modem on supported servers. The Netra does not support outgoing modem transactions.

scadm modem_setup

scadm resetrsc [-s]

Resets ALOM immediately. The -s option specifies a soft reset.

scadm resetrsc

scadm send_event [-c]

Sends a custom message as an event. The -c option assigns a critical level to the event.

scadm send_event

scadm set

Sets the specified ALOM configuration variable to the assigned value.

scadm set

scadm show

Displays the current value of the specified ALOM configuration variable.

scadm show

scadm shownetwork

Displays the current network configuration information.

scadm shownetwork

scadm useradd

Adds an ALOM user account.

scadm useradd

scadm userdel

Deletes an ALOM user account.

scadm userdel

scadm userpassword

Sets or changes a user's password.

scadm userpassword

scadm userperm

Sets or changes a user's permissions.

scadm userperm

scadm usershow

Shows the information for an ALOM user account.

scadm usershow

scadm version [-v]

Displays ALOM version information. The -v option provides verbose output.

scadm version



procedure icon  To Use the scadm Commands

Make sure that you have set your path to the scadm utility and have logged in to the host system as superuser; or use the cd command to move to the /usr/platform/platform/sbin directory, where platform is the platform name for your host server. See To Set Your Path to the scadm Utility to set your path and find out the platform name of your server.

single-step bulletTo use a command, type the following at the host system's superuser prompt. Substitute the command you want to use for command.


# scadm command 

Related Information

scadm Error Messages


Descriptions of scadm Commands

scadm consolehistory

Use the scadm consolehistory command to display the SC's console log. The SC maintains a running log which captures all console output. This log is maintained as a first-in, first-out buffer. New console output may displace old console output if the buffer is full. By default, only the last eight kilobytes of the console log file are displayed.



Note - This command is supported on Sun Fire V215, V245, and V445 servers only.




procedure icon  To Use the scadm consolehistory Command

1. Log in to the host server as superuser.

2. Do one of the following:

Related Information

scadm date

Use the scadm date command to show the ALOM date and time. This command works like the ALOM shell command showdate.



Note - Your host server uses local time, but ALOM uses Coordinated Universal Time (UTC). ALOM does not accept time zone conversions or daylight time changes.




procedure icon  To Use the scadm date Command

1. Log in to the host server as superuser.

2. At the system's superuser prompt, type the following command:


# scadm date

As an example of output:


# scadm date 
MON SEP 16 21:45:00 2002 UTC

The date command shows values in the mmddHHMMccyy.SS format as described below.


TABLE 7-2 scadm date Command Options

Option

Description

mm

Month

dd

Day

HH

Hour (24-hour system)

MM

Minutes

.SS

Seconds

cc

Century (first two digits of the year)

yy

Year (last two digits of the year)


Related Information

scadm download

Use the download command to program the ALOM firmware. This command works like the ALOM shell command flashupdate. See flashupdate for more on that command.

You can find the links to the download sites on the ALOM product page at:

http://www.sun.com/servers/alom.html



Note - If you have a Sun Fire V215, V245, or V445 server, you have a single image to install (alomfw). All other servers require two images (alombootfw and alommainfw). Prior to running the flashupdate command, see the README file for your server for instructions about installing the images on the server.





Note - Downloading the main firmware image can take up to 10 minutes. The boot monitor (bootmon) image download process can take several minutes to complete. After the download is complete, ALOM automatically resets.





caution icon

Caution - Do not use thescadm resetrsccommand while a firmware update is in progress. If you must reset ALOM manually, wait until after the update is complete. Otherwise, you could corrupt the ALOM firmware and render it unusable.




procedure icon  To Use the scadm download Command

1. Log in to the host server as superuser.

2. Do one of the following:

Where platform-name is the platform name for your host server.

a. To download the ALOM main image, type the following command:


# scadm download /usr/platform/platform-name/lib/images/alommainfw 

Where platform-name is the platform name for your host server.

b. To download the boot monitor image, type the following command:


# scadm download boot /usr/platform/platform-name/lib/images/alombootfw

Where platform-name is the platform name for your host server.

See To Set Your Path to the scadm Utility to set your path and find out the platform name of your server.

Command Option

The download command uses one option: boot.

This option directs the download command to program the boot monitor with the downloaded file you specify.



Note - Downloading the main firmware image may take up to 10 minutes. The bootmonitor download process can take several minutes to complete.



Related Information

scadm fruhistory



Note - The fruhistory command is available on Sun Fire V215, V245, and V445 servers only.



Use the scadm fruhistory command to display the most recent entries in the field-replaceable unit (FRU) log maintained by the SC. The optional -a argument causes the entire FRU log history to be displayed. This command is similar to the ALOM shell command showfru.


procedure icon  To Use the scadm fruhistory Command

1. Log in to the host server as superuser.

2. Do one of the following:

Related Information

scadm help

Use the help command to list the available commands for the scadm utility and shows their syntax.


procedure icon  To Use the scadm help Command

1. Log in to the host server as superuser.

2. At the system's superuser prompt, type the following command:


# scadm help 

For example:


CODE EXAMPLE 7-1 scadm help Commands
# scadm help 
 
USAGE: scadm <command> [options] 
   For a list of commands, type "scadm help" 
 
scadm- COMMANDS SUPPORTED 
   help, date, set, show, resetrsc, download, send_event, modem_setup,
   useradd, userdel, usershow, userpassword, userperm, shownetwork, 
   consolehistory, fruhistory, loghistory, version
 
SCADM - COMMAND DETAILS 
   scadm help => this message 
   scadm date [-s] | [[mmdd]HHMM | mmddHHMM[cc]yy] [.SS] => print or set date 
   scadm set <variable> <value> => set variable to value 
   scadm show [variable] => show variable(s)
   scadm resetrsc [-s] => reset SC (-s soft reset) 
   scadm download [boot] <file> => program firmware or [boot] monitor 
   scadm send_event [-c] "message" => send message as event (-c CRITICAL) 
   scadm modem_setup => connect to modem port 
   scadm useradd <username> => add SC user account 
   scadm userdel <username> => delete SC user account 
   scadm usershow [username] =>show user details 
   scadm userpassword <username> => set user password 
   scadm userperm <username> [cuar] => set user permissions 
   scadm shownetwork => show network configuration 
   scadm consolehistory [-a] => show SC console log
   scadm fruhistory [-a] => show SC FRU log
   scadm loghistory [-a] => show SC event log 
   scadm version [-v] => show SC version (-v verbose)
 
#

Related Information

scadm loghistory

Use the scadm loghistory command to display the most recent entries in the ALOM event buffer. These events include server reset events and all ALOM or scadm commands that change the state of the system (such as reset, poweroff, and poweron in the ALOM command shell). This command is similar to the ALOM shell command showlogs. Each event recorded in the log has the following format:


date time errorcode: message

Where date time is the date and time at which the event occurred, as recorded by ALOM, errorcode is the code for the logged event, and message is a short description of the event.

The optional -a argument causes the entire SC event log history to be displayed. The -a argument is available only on the Sun Fire V215, V225, and V445 servers running the Solaris 10 6/06 OS.


procedure icon  To Use the scadm loghistory Command

1. Log in to the host server as superuser.

2. Do one of the following:

The following example shows an event log entry:


MAR 08 13:41:21 wgs-48-49: 00060000: "SC Login: User admin Logged on." 



Note - Timestamps recorded in console logs reflect server time. Timestamps shown in the ALOM event log reflect UTC (Coordinated Universal Time).



Related Information

scadm modem_setup

The scadm modem_setup command is not supported on the Netra 240, Netra 440, Sun Fire V210, Sun Fire V240, Sun Fire V250, or Sun Fire V440 servers. For information about how to set up an external modem to support incoming transactions, see the description of the if_modem variable (see if_modem).

Related Information

scadm resetrsc

Use the scadm resetrsc command to reset ALOM. This command works like the ALOM shell command resetsc. See resetsc for more information on that command.



caution icon

Caution - Do not use the scadmresetrsccommand while a firmware update (scadmdownloador flashupdate) is in progress. If you must reset ALOM, wait until after the update is complete. Otherwise, you could corrupt the ALOM firmware and render it unusable. Seescadm downloadand flashupdatefor more information.




procedure icon  To Use the scadm resetrsc Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm resetrsc option

Where option is -s, if desired.

This command causes ALOM to reset immediately.



Note - The host server does not respond after you type the scadm resetrsc command; the reset occurs immediately.



After you reset ALOM, the serial connection times out at the login prompt after one minute and takes the console write lock automatically if no one else has it by then. The username field shows auto in the showusers command output entry for the serial interface. For example:


sc> showusers
username  connection  login time      client IP addr   console
--------------------------------------------------------------
auto      serial      Apr 14 10:30                     system

The word system under console means that the connection has the console write lock.

If you use the console -f command after resetting ALOM and the serial connection times out, you receive this message:


sc> console -f
Warning: User <auto> currently has write permission to this console and forcibly removing them will terminate any current write actions and all work will be lost. Would you like to continue? [y/n]y

3. Type y for yes, if you want to obtain the console write lock.

See console, resetsc, and showusers for more information.

Command Option

The resetrsc command uses one option: -s.

This option causes a soft reset to occur. If you type scadm resetrsc without using the -s option, a hard reset occurs.

Related Information

scadm send_event

All events recorded in the ALOM event log can be sent as email alerts.

Use the scadm send_event command to send the events to the following destinations:


procedure icon  To Use the scadm send_event Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm send_event "message" 

Where message is your customized message.

For example:

Using the -c option sends a critical event:


# scadm send_event -c "Restarting the server at 4:00 PM" 

Using the send_event without the -c option sends a major event:


# scadm send_event "TEST" 

Related Information

scadm set

Use the scadm set command to set an ALOM configuration variable to the desired value. This command works like the ALOM shell command setsc. See Overview of the ALOM Command Shell for more information.


procedure icon  To Use the scadm set Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm set variable value

Where variable is the name of the variable you want to set, and value is its value.

For example:


# scadm set netsc_ipaddr 123.123.123.123 

Note that the set command accepts only two parameters: a variable and one value string. If the value string that you want to set in the variable contains more than one word, enclose the entire value string in quotation marks. For example:


# scadm set mgt_mailalert "dgd@central 3"

Related Information

scadm show

Use the scadm show command to view the value for the specified ALOM configuration variable. This command works like the ALOM shell command showsc. See Overview of the ALOM Command Shell for more information on that command.


procedure icon  To Use the scadm show Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm show variable 

Where variable is the name of the variable.

For example:


# scadm show netsc_ipaddr 
xxx.xxx.xxx.xxx 

Typing scadm show with no variables displays the values for all variables.


CODE EXAMPLE 7-2 Example of scadm show Output

# scadm show 
if_network="true" 
if_modem="false" 
if_emailalerts="false" 
sys_autorestart="xir" 
sys_xirtimeout="900" 
netsc_tpelinktest="true" 
netsc_dhcp="false" 
netsc_ipaddr="129.148.40.233" 
netsc_ipnetmask="255.255.255.0" 
netsc_ipgateway="129.148.40.254" 
mgt_mailhost="" 
mgt_mailalert=""
sc_customerinfo="" 
sc_escapechars="#." 
sc_powerondelay="true" 
sc_powerstatememory="false" 
sc_clipasswdecho="true" 
sc_cliprompt="sc" 
sc_clitimeout="0" 
sc_clieventlevel="2" 
sc_backupuserdata="true" 
sys_eventlevel="2"

Related Information

scadm shownetwork

Use the scadm shownetwork command to display the current network configuration. This command is similar to the ALOM shell command shownetwork. See shownetwork for more on that command.



Note - If you have changed the network configuration since the last time you rebooted the host server, the output from this command might not show the updated configuration information. Reboot your server to see the changed configuration.




procedure icon  To Use the scadm shownetwork Command

The command output appears similar to the following example, with the actual IP addresses, netmask, and Ethernet addresses in your network configuration in place of XXX.XXX.XXX.XXX.

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm shownetwork 
SC network configuration is: 
IP address: XXX.XXX.XXX.XXX 
Gateway Address: XXX.XXX.XXX.XXX 
Netmask: XXX.XXX.XXX.XXX 
Ethernet Address: XX:XX:XX:XX:XX:XX

Related Information

scadm useradd

Use the scadm useradd command to add a user account to ALOM. This command is similar to the ALOM shell command useradd. See useradd for more on that command.

You can add a maximum of 15 unique user accounts to ALOM.


procedure icon  To Use the scadm useradd Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm useradd username 

Where username is the name of the user you want to add. The username variable has the following restrictions:

To assign a password to a user name, use the scadm userpassword command. See scadm userpassword.

To set permission levels for a user name, use the scadm userperm command. See scadm userperm.

Related Information

scadm userdel

Use the scadm userdel command to delete a user account from ALOM. This command is similar to the ALOM shell command userdel. See userdel for more on that command.



Note - You cannot delete the default admin account from ALOM.




procedure icon  To Use the scadm userdel Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm userdel username

Where username is the name of the user you want to delete.

Related Information

scadm userpassword

Use the scadm userpassword command to set or change the password for the specified user account. This command is similar to the ALOM shell command userpassword. See userpassword for more on that command.


procedure icon  To Use the scadm userpassword Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm userpassword username 

Where username is the name of the user for whom you want to set or change the password.

This command does not prompt you for the existing password.

For example:


# scadm userpassword msmith 
New password: 
Re-enter new password: 

Password Restrictions

Passwords have the following restrictions:

Related Information

scadm userperm

Use the userperm command to set or change permission levels for a specified user account. This command is similar to the ALOM shell command userperm. See userperm for more information.



Note - If there is only one account on ALOM (admin account), that account cannot be deleted, nor can you remove the a or u user permissions from that account.



Permission Levels

All users can read ALOM information, but you need authorization to perform ALOM functions or change settings. There are four permission levels that increase a user's authorization.


TABLE 7-3 scadm userperm Permission Levels

Permission Level

Description

a

Administrative. This user is authorized to change the state of ALOM configuration variables. See Using ALOM Configuration Variables.

u

User administration. This user is authorized to add users and delete users, change user permissions, and change the authorization level of other users. See scadm useradd and scadm userdel for more information.

c

Console permission. This user is authorized to connect to the host server system console. See console for more information on the console command.

r

Reset/power permission. This user is authorized to reset the host server, power the server on and off, and reboot ALOM. See reset, poweron, poweroff, and scadm resetrsc for detailed information of these processes.


If you do not assign a permission level to the specified user (that is, you assigned zero permission levels), then that user has read-only permission. This is the default level for a new ALOM user account.



Note - The default user permission for the account that you use when you start ALOM for the first time is cuar (full authorization). This account is the admin account, and it cannot be deleted, nor can its permissions be changed.



To see a user's permission levels, use the usershow command. See scadm usershow.


procedure icon  To Use the scadm userperm Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm userperm username perms 

Where username is the specified user account and perms is the permission level(s) you want to set or change (if any).

For example, to assign c and r user permissions to user msmith, you would type the following from the system superuser prompt:


# scadm userperm msmith cr

Related Information

scadm usershow

The scadm usershow command shows a specified user's ALOM account, along with each user's permissions and whether a password has been assigned. See scadm userperm, and scadm userpassword for more on permissions and passwords. To see this information for a particular user, type the desired user name after the usershow command. If you do not enter any user names, usershow displays all of the accounts. This command is similar to the ALOM shell command usershow. See usershow for more on that command.


procedure icon  To Use the scadm usershow Command

1. Log in to the host server as superuser.

2. To see the information for one user, type the following command at the superuser prompt:


# scadm usershow username

Where username is the name of the specified user whose information you want to show, if desired. If you do not any user names, usershow displays all of the accounts.

For example:



#scadm usershow
Username      Permissions      Password? 
---------------------------------------- 
admin          cuar             Assigned
wwilson        cuar             Assigned
jadams         --cr             None

CODE EXAMPLE 7-3 Example of scadm usershow Specific User Output

#scadm usershow wwilson
Username      Permissions      Password? 
----------------------------------------
wwilson        cuar             Assigned

 

Related Information

scadm version

Use the scadm version command to display ALOM version information.


procedure icon  To Use the scadm version Command

1. Log in to the host server as superuser.

2. At the superuser prompt, type the following command:


# scadm version option

Where option is -v, if desired.

For example:


# scadm version
SC Version v1.4
SC Bootmon Version:  v1.4.0
SC Firmware Version:  v1.4.0

 


# scadm version -v
SC Version v1.4
SC Bootmon Version:  v1.4.0
SC Bootmon checksum: DE232BFF
 
SC Firmware Version:  v1.4.0
SC Build Release: 06
 
SC firmware checksum: EAC2EF86
 
SC firmware built: Feb 23 2006, 15:17:59
 
SC System Memory Size 8MB
 
SC NVRAM Version = a

Related Information