Using the RSC Command Shell
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.
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.
Note - Some commands require a specific user permission level. See userperm username [a][u][c][r] for information about user permission levels.
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.
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.
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.
- environment (or showenvironment)
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).
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.
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.
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.
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 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.
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.
Note - The default configuration of Sun workgroup server firmware does not invoke POST when the server resets. However, you can change this behavior through NVRAM variable settings; for additional details, see the Platform Notes for your server.
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.
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.
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.
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.
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.
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.
- 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)
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).
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.
See loghistory [index [+|-]n] [pause n] for a description of the index subcommand.
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.
- date (also showdate and setdate)
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.
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.
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.
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.
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:
- 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.
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.
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:
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:
- 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).
- 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.)
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.