Using the RSC Command Shell
The RSC command shell is a simple command-line interface that supports commands that allow you to administer or diagnose the server. It also has commands for configuring RSC.
RSC supports a total of four concurrent telnet sessions per server, including command-line interface sessions and a graphical user interface (GUI) connection to the server console (Open Console). In addition, RSC supports up to four active concurrent RSC GUI sessions.
Note - Sun Enterprise 250 servers support two concurrent telnet sessions and three active concurrent RSC GUI sessions. |
After you log in to your RSC account, the RSC shell prompt appears (rsc>), and you can enter RSC shell commands. This chapter tells you how to log in to your RSC account and describes RSC command use and syntax.
The following table summarizes RSC shell commands. Each command is explained in greater detail in the following sections.
Note - For Sun Enterprise 250 servers, the following shell command aliases are not available: showenvironment, showdate, setdate, and showsc. |
More detailed descriptions of the commands are provided in the following sections.
Note - Some commands require a specific user permission level. See userperm username [a][u][c][r] for information about user permission levels. |
Logging In to Your RSC Account
After RSC software is installed and configured and an account has been set up for you, you can connect to RSC and log in to your account using a Solaris workstation, Microsoft Windows PC, standard ASCII character terminal, or a computer running ASCII terminal emulation software.
Follow these steps to log in to your RSC account:
1. Connect to RSC using one of these methods:
a. Use point-to-point protocol (PPP) to connect to your company Ethernet, and then use the telnet command to connect to RSC.
Ask your network administrator if you do not know the server's RSC name (Sun recommends the name servername-rsc). Note that, unlike the graphical user interface, the command-line interface does not attempt to connect to RSC by appending -rsc to the name you enter if that name fails.
b. If you are already connected to your company Ethernet, use the telnet command to connect to RSC.
c. Use PPP to connect to the RSC modem. To use this option, PPP must be enabled.
d. If PPP is not enabled, dial in to the RSC modem.
When connection is established, the following screen appears:
e. If your server has an RSC serial port, connect an ASCII terminal directly to the RSC serial port.
Note - To use this method on Sun Enterprise 250 servers, you must disable PPP by using the RSC shell, RSC GUI, or the rscadmutility to set the ppp_enabledconfiguration variable to false. |
2. When connection is established, type your RSC login name.
Your password is not echoed on the screen. After you correctly enter your password, RSC displays this command prompt:
You can enter RSC shell commands at the rsc> prompt.
Logins are recorded in the RSC event log. In addition, RSC sends an alert if it detects more than five login failures within five minutes. Except for Sun Enterprise 250 servers, RSC automatically disconnects a session after 10 minutes of user inactivity.
Note - For Sun Enterprise 250 servers, you can set RSC to disconnect a session connected to the serial port after 10minutes of inactivity. |
Server Status and Control Commands
The following RSC commands show server status or control server operation:
- environment (or showenvironment)
- shownetwork
- console
- break
- xir
- bootmode
- reset
- poweroff
- poweron
- setlocator
- showlocator
environment
Use the environment command to display a snapshot of server environmental status, such as temperatures, power supply status, front panel LED status, keyswitch position, and so forth. You can also use the command abbreviation env. The display uses similar format to that used for the UNIX command prtdiag(1m).
The display differs according to the server model and configuration. Note that some environmental information may be unavailable when the server is in Standby mode.
showenvironment
The shownenvironmentcommand is the same as the environmentcommand. (Not available for Sun Enterprise 250 servers.)
shownetwork
The shownetwork command displays the current network configuration.
For example:
console
Use the console command to enter RSC console mode and connect to the server console from the RSC shell. When you use this command, the system displays a standard Solaris login prompt. If RSC is not designated as the server console, nothing is displayed.
You must have C level user permission to use this command. An escape character sequence is used to return to the RSC prompt. The default escape sequence is ~. (tilde period). See escape_char.
break
Use the break command to put the server into Debug mode. You must have C level user permission to use this command. The server front panel keyswitch must not be in the Lock position, and RSC must be designated as the console (see Chapter 6). Debug mode can use either kadb or OpenBoot PROM, depending on server configuration.
xir
This command generates the equivalent of an externally initiated reset (XIR) of the server. You must have R level user permission to use this command. The server enters OpenBoot PROM mode and displays the ok prompt. This command is useful for driver or kernel debugging, as most of the contents of the server's memory and registers is preserved. To resume operation of the system after using the xir command, you must reboot the server.
bootmode [-u] [normal|forth|reset_nvram|diag|
skip_diag]
This command provides control over the server firmware behavior after a server reset. Functionality of this command is identical to that available on non-USB Sun keyboards using L1 key combinations. You must have R level user permission to use this command. If you use the bootmode command without arguments, RSC displays the current boot mode.
The bootmode setting overrides the server's OpenBoot Diagnostics diag-switch? setting immediately after the next reset only. If RSC does not detect a server reset within 10 minutes, the bootmode command is ignored. For example:
To set the diag or skip_diag option, you must follow the bootmode command with the poweroff and poweron commands within 10 minutes. For example:
To force console input and output to RSC, use the -u option before specifying the boot mode. This is the equivalent of using the OpenBoot PROM commands shown in Redirecting the Console to RSC, but affects the next boot only.
The following table describes modes you can specify using the bootmode command.
Note - The diag and skip_diag modes take effect only if you follow the bootmode command with the poweroff and poweron commands within 10 minutes. |
reset
This command forcibly resets the server immediately. You must have R level user permission to use this command. The server reboots according to the server's designated boot mode. The reset command does not perform a clean shutdown of the system, and data may be lost. When possible, use the corresponding Solaris administration command instead.
poweroff
Use the poweroff command to power off the server. You must have R level user permission to use this command. This command has no effect if the server is already powered off. RSC remains available since it uses the server's standby power. Note, however, that some environmental information may be unavailable when the server is in Standby mode.
The poweroff command attempts to perform a clean shutdown of the system. However, when possible, use the corresponding Solaris administration command instead.
It can take up to 35 seconds for the poweroff command to completely shut down the system (except on Sun Enterprise 250 servers). This is because RSC waits for a clean shutdown to complete before poweroff can occur.
Note - For Sun Enterprise 250 servers, the poweroffcommand does not perform a clean shutdown of the system. |
poweron
Use the poweron command to power on the server. You must have R level user permission to use this command. This command has no effect if the server's keyswitch is in the Standby position, or the server is already powered on.
setlocator
Use the setlocator command to turn the system locator LED on or off. This command applies to Sun Fire V480 servers only. For more information on this command, refer to Controlling the Locator LED.
For more information on the locator LED, refer to the Sun Fire V480 Administrator's Guide.
showlocator
Use the showlocator command to view the state of the system locator LED (on or off). This command applies to Sun Fire V480 servers only. For more information on this command, refer to Controlling the Locator LED.
For more information on the locator LED, refer to the Sun Fire V480 Administrator's Guide.
RSC View Log Commands
Use the following RSC commands to work with RSC and console log files:
loghistory [index [+|-]n] [pause n]
Use the loghistory command without subcommands to display the history of all events logged in the RSC event buffer. These events include server reset events and all RSC commands that change the state of the system. You can also use the command abbreviation lhist.
Use the following subcommands to control loghistory display.
index [+|-]n
Use the index subcommand to designate a buffer position at which to begin the display, as follows:
- index +n to designate a line number relative to the beginning of the buffer
- index -n to designate a line number relative to the end of the buffer
- index n to designate a line number relative to the beginning of the buffer (same as index +n)
The origin of counting is 1; that is, index +1 indicates the first line in the buffer, index -1 indicates the last. For example:
This command prints the last 30 lines and any additional lines that were appended to the buffer between the time that the command began execution and the time that it terminated.
pause n
Use the pause subcommand to display n lines of the log at a time (similar to the more command). The value of n must be a decimal integer. The default is to display the entire RSC log without pausing.
Each event recorded in the log has the following format:
EVENTID is a unique identifier for the event, TIME is the time the event occurred (as measured by RSC time), and message is a user-friendly description of the event.
The following is an example event log entry:
consolehistory [boot|run|oboot|orun]
[index [+|-]n] [pause n]
Use the consolehistory command to display console messages logged in RSC buffers. With no arguments, this command prints the entire contents of all non-empty console buffers. You can use the command abbreviation chist.
- The boot buffer contains POST, OpenBoot PROM, and UNIX boot messages received from the server for the most recent boot.
- The run buffer contains the most recent data received from the server operating system.
- The oboot buffer contains POST, OpenBoot PROM, and UNIX boot messages for the first power-on boot, the original boot.
- The orun buffer contains the data received from the server's operating system after the first reboot that follows a power-on boot (the original boot).
Each buffer can contain up to 64Kbytes of information. (On Sun Enterprise 250 servers, the original boot log and boot log buffers can contain up to 16 Kbytes of information.)
When the first power-on boot begins, RSC fills the original boot (oboot) buffer with data from the server's console. After that buffer fills up, it writes data to the original run (orun) log. When the orun log fills up, it overwrites old data in the orun log.
When RSC senses a server reset while writing the orun log, it switches to the boot log. After that fills up, it switches to the run log. When the run log fills up, it overwrites old data in the run log.
When RSC senses a server reset while writing the current run log, it switches to the current boot log again.
pause n
Use the pause subcommand to display n lines of the log at a time (similar to the more command). The value of n must be a decimal integer. The default is to display 10 lines of the log at a time.
See loghistory [index [+|-]n] [pause n] for a description of the index subcommand.
consolerestart
Use the consolerestart command to make the current boot and run logs the original logs (designated oboot and orun). This command copies the current boot and run buffers to the oboot and orun buffers, overwriting the previous contents. Next, it clears the current boot and run buffers, and begins logging to the old run log. You must have A level user permission to use this command.
For example, after adding a hardware component to the server, reboot the server and use the consolerestart command so that the new component will appear in the original console logs.
RSC Configuration Commands
Use the following RSC commands to set or show characteristics of the RSC or server configuration:
- set
- show
- date (also showdate and setdate)
- password
- useradd
- userdel
- usershow
- userpassword
- userperm
- resetrsc
set variable value
Use the set command to set an RSC configuration variable. You must have A level user permission to use this command. See RSC Configuration Variables for descriptions of these variables.
Changes to some variables do not take effect until the you reset RSC using the command-line interface (CLI) resetrsc command, or the rscadm subcommand rscadm resetrsc, or by using the graphical user interface.
You can use the null string ("") to set a variable to null. To set a variable to a string that includes spaces, enclose the string in double quotes. For example:
show [variable]
Use the show command to display the value of RSC configuration variables. You can specify one variable only; if you do not specify a variable, RSC displays all configuration variables. See RSC Configuration Variables for descriptions of these variables.
date [[mmdd]HHMM|mmddHHMM[cc]yy][.SS]
Use the date command without arguments to show RSC's current date and time. If you have A level user permission, you can use the date command to set the current date and time. The following table describes components of the date format.
You may omit the month, day, and year; the current values are applied as defaults.
rsc> date 091521452000 Fri Sep 15 21:45:00 EDT 2000 rsc> date 09152145 Fri Sep 15 21:45:00 EDT 2000 rsc> date 2145 Fri Sep 15 21:45:00 EDT 2000 |
The first example sets the time to September 15, 9:45 p.m., 2000. The second example sets the time to September 15, 9:45 p.m. of the current year. The third example sets the time to 9:45 p.m. of the current month, day, and year.
showdate
Same as the datecommand without arguments. (Not available for Sun Enterprise 250 servers.)
setdate
Same as the datecommand with arguments. You need to have Alevel user permission to use the setdatecommand to set the RSC current date and time.
(Not available for Sun Enterprise 250 servers.)
password
Use the password command to change the RSC password for the account to which you are logged in. This command behaves similarly to the UNIX passwd(1) command.
When used to change a password, RSC prompts for your current password, and if you enter it correctly, it prompts for the new password. RSC prompts again for the new password and updates it if entered identically both times. For example:
rsc> password password: Changing password for username Enter login password: ****** Enter new password: ****** Re-enter new password: ****** rsc> |
Passwords have the following restrictions:
- They must contain at least six characters (only the first eight characters are significant).
- They must contain at least two alphabetic characters and at least one numeric or special character; alphabetic characters can be both uppercase and lowercase.
- They must differ from the user's login name and any reverse or circular shift of that login name; for comparison purposes, uppercase and lowercase letters are equivalent.
- The new password must differ from the old by at least three characters; for comparison purposes, uppercase and lowercase letters are equivalent.
useradd username
Use the useraddusernamecommand to add an RSC user account. You must have Ulevel user permission to use this command. The maximum number of RSC user accounts is 16, except on Sun Enterprise 250 servers, where the maximum number is 4. Valid characters for usernameinclude:
The usernamefield has a maximum length of 16 characters (eight characters for Sun Enterprise 250 servers), must contain at least one lowercase alphabetic character, and the first character must be alphabetic. If these restrictions are not met, the system issues a warning and the command fails.
userdel username
This command deletes an RSC user account. You must have U level user permission to use this command.
usershow [username]
This command shows RSC user accounts; a maximum of 16 user accounts are available (4 on the Sun Enterprise 250 servers). You must have Ulevel user permission to use this command. If no argument is supplied, all accounts are shown. Information displayed includes username, permissions, and whether a password is assigned. For example:
rsc> usershow Username Permissions Password? setup cuar Assigned msmith c--r None rsc> |
userpassword username
This command sets or changes the password for the specified user account. You must have U level user permission to use this command. RSC does not prompt for an existing password. See the password command for details on password format and restrictions. For example:
userperm username [a][u][c][r]
This command sets or changes permission levels for a specified user account.
All RSC users can look at RSC information. The following arguments increase a user's authorization level:
- a - Administration permission; authorized to change the state of RSC configuration variables
- u - User administration permission; authorized to use commands that add and delete users, change user permissions, and change the authorization level of other users
- c - Console permission; authorized to connect to the server console
- r - Reset/power permission; authorized to reset, power on, and power off the server, and reboot RSC
You must have U level user permission to use this command. You can specify zero through four authorizations. The default authorization level for a new RSC account is none of the above (that is, read-only).
If you do not specify authorization levels, RSC sets the permissions for username to read-only. However, the default user permission for the account you create during the installation procedure is cuar (full authorization).
A user with read-only permission can only use the following commands:
- date(without arguments) and showdate(The showdatecommand is not available on Sun Enterprise 250 servers.)
- environmentand showenvironment(The showenvironmentcommand is not available on Sun Enterprise 250 servers.)
resetrsc
The resetrsc command performs a hard reset of RSC. This terminates all current RSC sessions. You must have A level user permission to use this command. You can also reset RSC by using the rscadm resetrsc command.
Other RSC Commands
help
The help command displays a list of all RSC shell commands and a brief description of each.
version [-v]
The version command displays the firmware version running on RSC. Use the -v option to display more verbose information. For example:
showsc
Same as the versioncommand without the -voption. (Not available for Sun Enterprise 250 servers.)
logout
The logout command ends your RSC session and closes your RSC connection.
flashupdate ip_address image
The flashupdate command updates the RSC Flash ROM image at the IP address you specify, with the image you specify.
showfru
The showfru command displays information stored in the RSC serial EEPROM.
No comments:
Post a Comment