C H A P T E R  6

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 is located on the Solaris HW Supplement CD for 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 root.

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,Netra-x40

The result you see depends on your server model. This example has the default installation directory for the ALOM software in:

/usr/platform/SUNW,Netra x40/sbin

where Netra x40 is either Netra 240 or Netra 440, depending on your system.

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 6-1 List of scadm Commands

Command

Description

Refer to:

scadm help

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

scadm help.

scadm date

Displays the date and time.

scadm date.

scadm shownetwork

Displays the current network configuration information.

scadm shownetwork.

scadm show

Displays the current value of the specified ALOM configuration variable.

scadm show.

scadm loghistory

Displays the events logged in the ALOM event buffer.

scadm loghistory.

scadm resetrsc [- s]

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

scadm resetrsc.

scadm set

Sets the specified ALOM configuration variable to the assigned value.

scadm set.

scadm download

Downloads main or bootmon firmware to the ALOM flash PROM

scadm download.

scadm modem_setup

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

scadm modem_setup.

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 version [-v]

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

scadm version.

scadm useradd

Adds an ALOM user account.

scadm useradd.

scadm userdel

Deletes an ALOM user account.

scadm userdel.

scadm usershow

Shows the information for an ALOM user account.

scadm usershow.

scadm userpassword

Sets or changes a user's password.

scadm userpassword.

scadm userperm

Sets or changes a user's permissions.

scadm userperm.



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

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

# scadm date 

For example:

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

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

TABLE 6-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

The ALOM firmware contains two parts: the main image and the boot monitor (bootmon).



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 the scadm resetrsc command while a firmware update is in progress. If you need to 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 root.

2. To program the main image, at the superuser prompt, type the following command:

# scadm download filename

Where filename is the name of the main image file you want to download.

For example:

To download the ALOM main firmware:

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

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

3. To program the boot monitor (bootmon), at the superuser prompt, type the following command:

# scadm download boot filename

Where filename is the name of the boot monitor file you want to download.

For example:

To download the bootmon image:

# 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 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 (root).

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

# scadm help 

For example:

CODE EXAMPLE 6-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, useperm, shownetwork, 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 loghistory => show SC event log 
scadm version [-v] => show SC version (-v verbose) 
#

Related Information

scadm loghistory

Use the scadm loghistory command to display the history of all events logged 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.


procedure icon  To Use the scadm loghistory Command

1. Log in to the host server as superuser (root).

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

# scadm loghistory. 

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 server. 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 scadm resetrsc command while a firmware update (scadm download or flashupdate) is in progress. If you need to reset ALOM, wait until after the update is complete. Otherwise, you could corrupt the ALOM firmware and render it unusable. Seescadm download and flashupdate for more information.




procedure icon  To Use the scadm resetrsc Command

1. Log in to the host server as superuser (root).

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.



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 (root).

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 (root).

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 

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 (root).

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 6-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 (root).

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 (root).

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

# scadm useradd username 

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

username 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 (root).

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 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. Refer to usershow for more on that command.


procedure icon  To Use the scadm usershow Command

1. Log in to the host server as superuser (root).

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 6-3 Example of scadm usershow Specific User Output

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

 

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 (root).

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 6-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 (root).

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 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 (root).

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 2004, 15:17:59
 
SC System Memory Size 8MB
 
SC NVRAM Version = a

Related Information