The DRAC 4 provides serial and racadm commands that allow you to manage and configure the managed system locally or remotely.
The serial/telnet console provides a set of serial commands. The serial commands, which include the racadm command, give you access to all of the text-based features supported by the DRAC 4 Web-based interface.
The racadm CLI allows you to locally or remotely configure and manage your DRAC 4. The racadm CLI runs on the management station and the managed system, and is available on the Dell Systems Management Consoles CD.
You can use the racadm CLI to write scripts to automatically configure multiple DRAC 4s. For more information about configuring multiple DRAC 4s, see "Configuring Multiple DRAC 4s."
The following sections provide information about using the serial and racadm commands (see "Using a Serial or Telnet Console" or "Using the racadm CLI"). Examples of the racadm command for configuring your DRAC 4 and information about using the racadm configuration file to configure multiple DRAC 4s are also provided.
Using a Serial or Telnet Console
The serial commands in Table 8-1 can be run from the serial or telnet console command prompt or the racadm CLI locally or remotely.
Logging into the DRAC 4
After you have configured your management station terminal emulator software, perform the following steps to log into the DRAC 4:
Connect to the DRAC 4 using your management station terminal emulation software.
Type your DRAC 4 user name and press <Enter>.
Type your DRAC 4 password and press <Enter>.
You are now logged into the DRAC 4.
Starting a Text Console
After you have logged into the DRAC 4 through your management station terminal software or by telnet, you can redirect the managed system text console by using connect com2, which is a serial/telnet command. Only one connect com2 client is supported at a time (out of four total sessions shared with the DRAC 4 Web-based interface).
To connect to the managed system text console, type connect com2 from the DRAC 4 command prompt (displayed through Minicom or HyperTerminal).
NOTE: When accessing a DOS console through connect com2, characters in the output may be dropped
during the output of large amounts of data (for example, the dump of large files greater than 30 lines).
This can cause incorrect displays in connect com2 over telnet sessions. Red Hat Enterprise Linux and the
Microsoft Windows Special Administration Console (SAC) work correctly.
connect com2 also supports the -h option. This option displays the history of the last characters written to the text console. The default (and maximum) size of the history buffer is 8192 characters. You can set this number to a smaller value using the command:
The connect -h com2 command displays the contents of the serial history buffer before waiting for input from the keyboard or new characters from the serial port.
NOTE: The terminal emulation type (ANSI or VT100) of the client terminal must match the type on the
server serial port output when using the -h option; otherwise, the output may be garbled. In addition, the
number of rows and columns of the client terminal must be set to 25.
Viewing a List of Serial/Telnet Commands
Type help to display the entire serial/telnet command list. Commands that are not supported on the system or interface that you are using are labeled as such. For example, if a specific command is not supported on the system, the following text is displayed next to the command:
<NOT SUPPORTED>
If you type a command that is not supported on the system you are using, an error similar to the following is displayed.
setsvctag: Firmware: UNSUPPORTED COMMAND
Table 8-1 lists the serial/telnet commands. These commands are also supported as racadm commands. The descriptions and "man page" information including required syntax for the serial/telnet commands are identical for the racadm command. You do not need to type racadm before typing a serial/telnet command because the serial/telnet commands are not racadm commands. They are at the same "level." For detailed information about the required syntax for each racadm command see "racadm Subcommand Man Pages."
Command-line status and configuration utility for the DRAC 4.
Using the racadm CLI
The racadm CLI commands can be run locally or remotely from the serial or telnet console command prompt or through a normal DOS or Linux command prompt.
Use the racadm command to configure DRAC 4 properties, perform remote management tasks, or recover a crashed system. Table 8-2 lists the racadm command that you can type into the racadm CLI.
When using the racadm CLI, type racadm help to display the entire racadm subcommand list, which lists all the commands supported by the DRAC 4. The following sections provide information about how to use the racadm commands.
NOTE: MS-DOS version 6.22 is required to use the DOS racadm command-line feature. To limit DOS
racadm output to a single screen, use the MS-DOS more.com utility. Type the following command at the
prompt: a: racadm help | more.
racadm Command Description
Table 8-2. racadm Command
Command
Description
racadm
Command-line status and configuration utility for the DRAC 4.
Without options, the racadm commandexecutes the help command, which displays a list of available commands and a one-line description of each. Typeracadm help<subcommand> to display any syntax and command-line options for the <subcommand>.
Using the racadm CLI Remotely
NOTICE: Configure the IP address on your DRAC 4 before using the racadm remote capability. For more
information about initially configuring your DRAC 4, including a list of other documents you may need, see
"Installing and Setting Up the DRAC 4."
The racadm CLI provides a remote capability option (-r) that allows you to connect to the managed system and execute racadm subcommands from a remote console or management station. To use the remote capability, you need a valid user name (-u option) and password (-p option), and the IP address of the managed system.
NOTE: The racadm remote capability is supported only on management stations running Microsoft
Windows 2000, Windows 2000 Professional, Windows Server 2003, and Red Hat Enterprise Linux
operating systems.
racadm <options> -i -r <racIpAddr> <subcommand> or racadm <options> -i -r <racIpAddr>:<new port number> <subcommand> if the DRAC 4 HTTPS port number has been changed.
racadm <options> -r <racIpAddr> <subcommand>
racadm Options
Table 8-3 lists the options for the racadm command.
Table 8-3. racadm Command Options
Option
Description
-r <racIpAddr> or -r <racIpAddr>:<port number> if the DRAC 4 port number has been changed
Specifies the remote IP address of the controller.
-i
Tells racadm to interactively query the user for the user's user name and password.
-u <usrName>
Specifies the user name that is used to authenticate the command transaction. If not specified, the default user name "racadmusr" is used. If the -u option is used, the -p option must be used, and the -i option (interactive) is not allowed.
-p <password>
Specifies the password used to authenticate the command transaction. If the -p option is used, the -i option is not allowed.
-l <lvl>
Specifies the log level for debug.
NOTE: If you use the -l<lvl> option without using the -L <file> option, a
default log file named racadm.log is created in the current working
directory.
-v <lvl>
Specifies the verbose level for screen output.
-t <secs>
Specifies the transport time-out.
-L <file>
Specifies a debug log file.
If you use the -r option, you must also use the -u and -p options to configure the DRAC 4 to accept racadm commands. Using the -r option without the previously listed options will result in a command failure.
Enabling and Disabling the racadm Remote Capability
NOTE: It is recommended that you run these commands on your local system.
The racadm CLI remote capability is enabled by default. If you have disabled it, type the following command to enable the remote capability:
The argument 0x3 for the log level is the OR of STDOUT and STDERR messages. Both of these message types are written to the file name log. The verbose, or -v, option defaults to 0x3, (OR of STDOUT and STDERR).
racadm Subcommand Descriptions
The following subsections provide descriptions of subcommands that you can run under the racadm CLI. Table 8-5 briefly describes each racadm subcommand. For a detailed listing of every racadm subcommand including syntax and valid entries, see the "racadm Subcommand Man Pages."
One of the major features of the racadm CLI is the ability to configure a DRAC 4 using a configuration file. The racadm CLI parses the DRAC 4 configuration file, called racadm.cfg, and then sends individual configuration requests to one or more DRAC 4s.
This method may be used to configure multiple DRAC 4 database properties. You must first run the racadm CLI to query a configured DRAC 4 for its database properties, which are accessed using their object group IDs and object IDs. The racadm CLI creates the racadm.cfg file from the retrieved information. You can then configure other cards with the same database information by exporting this file out to the other DRAC 4s.
NOTE: Some configuration files contain unique DRAC 4 information (such as the static IP address) that
must be modified before configuring other cards.
Configuration File Overview
To use the configuration file, perform the following high-level steps:
Get the configuration from the DRAC 4 that contains the appropriate configuration.
Modify the configuration (optional).
Push the configuration to a target DRAC 4.
Reset the target DRAC 4.
The getconfig -f racadm.cfg subcommand requests the configuration of the DRAC 4 and generates a racadm.cfg file (you can choose any name for this file).
NOTE: The generated .cfg file does not contain user passwords.
Other options for the getconfig command enable you to perform such actions as:
Displaying all configuration properties in a group (specified by group name and index)
Displaying all configuration properties for a user by user name
The config subcommand loads the information into other DRAC 4s. Other options for config enable you to perform such actions as:
Removing passwords in the racadm.cfg file used to configure the card
Synchronizing the user and password database with Server Administrator
The initial configuration file, racadm.cfg, is named by the user. In the following example, the configuration file is named myfile.cfg. To obtain this file, type the following command at the command prompt:
racadm getconfig -f myfile.cfg
NOTICE: It is recommended that you edit this file with a simple text editor; the racadm utility uses an
ASCII text parser, and any formatting confuses the parser and might corrupt the racadm database.
Creating a DRAC 4 Configuration File
The DRAC 4 configuration file <filename>.cfg is used with the racadm config -f<filename>.cfg command. The configuration file is a simple text file that allows the user to build a configuration file (similar to an .ini file) and configure the DRAC 4 from this file. You may use any file name, and the file does not require a .cfg extension (although it is referred to by that designation in this subsection). The .cfg file can be:
Created
Obtained from a racadm getconfig -f <filename>.cfg command
Obtained from a racadm getconfig -f <filename>.cfg command, and then edited
NOTE: See "config/getconfig" for information about the getconfig command.
The .cfg file is first parsed to verify that valid group and object names are present and that some simple syntax rules are being followed. Errors are flagged with the line number in which the error was detected, and a simple message explains the problem. The entire file is parsed for correctness, and all errors are displayed. Writes are not performed to the DRAC 4 if an error is found in the .cfg file. The user must correct all errors before any configuration can take place. The -c option may be used in the config subcommand, which verifies syntax only and does not perform writes to the DRAC 4.
Remember the following important points:
If the parser encounters an indexed group, it is the value of the anchored object that differentiates the various indexes.
The parser reads in all of the indexes from the DRAC 4 for that group. Any objects within that group are simple modifications at configuration time. If a modified object represents a new index, the index is created on the DRAC 4 during configuration.
The user cannot specify a desired index in a .cfg file.
Indexes may be created and deleted, so over time the group may become fragmented with used and unused indexes. If an index is present, it is modified. If an index is not present, the first available index is used. This method allows flexibility when adding indexed entries, where the user does not need to make exact index matches between all the RACs being managed; new users are added to the first available index. A .cfg file that parses and runs correctly on one DRAC 4 may not run correctly on another if all indexes are full and a new user is to be added.
Use the racresetcfg subcommand to keep all DRAC 4s the same.
To keep all DRAC 4s the same, use the racresetcfg subcommand to reset the DRAC 4 to original defaults, and then run the racadm config -f <filename>.cfg command. Ensure that the .cfg file has all the desired objects, users, indexes, and other parameters.
NOTICE: Use the racresetcfg subcommand to reset the database and the DRAC 4 NIC settings to the
original default settings and remove all users and user configurations. While the root user is available,
other users' settings are also reset to the default.
Parsing Rules
All lines that start with '#' are treated as comments.
A comment line must start in column one. A '#' character in any other column is treated as a # character. (Some modem parameters may have # characters as part of their string. An escape character is not required. You may want to generate a .cfg from a racadm getconfig -f <filename>.cfg command, and then perform a racadm config -f <filename>.cfg command to a different DRAC 4, without adding escape characters).
Example:
#
# This would be a comment
[cfgUserAdmin]
cfgUserAdminPageModemInitString=<Modem init # not a comment>
All group entries must be surrounded by "[" and "]" characters.
The starting "[" character denoting a group name must start in column one. This group name must be specified before any of the objects in that group. Objects that do not have an associated group name generate an error. The configuration data is organized into groups as defined in "DRAC 4 Property Database Group and Object Definitions."
The following example displays a group name, object, and the object's property value.
Example:
[cfgLanNetworking]
cfgNicIpAddress=143.154.133.121
All parameters are specified as "object=value" pairs without any white space between the object, =, or value.
White spaces after the value are ignored. A white space inside a value string is left unmodified. Any character to the right of the '=' is taken as is (for example, a second '=', or a '#', '[', ']', and so forth). All of these characters are valid modem chat script characters.
See the example in the previous bullet.
An indexed object entry is ignored by the .cfg parser.
The user cannot specify which index is used. If the index already exists, it is used, or else the new entry is created in the first available index for that group. The racadm getconfig -f <filename>.cfg command places a comment in front of index objects, which allows the user to see which comments are being used.
NOTE: The user may create an indexed group manually using the following command:
NOTE: A NULL string (two "" characters) directs the DRAC 4 to delete the index for the specified group.
To view the contents of an indexed group, use the following command:
racadm getconfig -g <groupName> -i <index 1-16>
For indexed groups the object anchor must be the first object after the "[ ]" pair. The following are examples of the current indexed groups:
[cfgUserAdmin]
cfgUserAdminUserName=<USER_NAME>
"
[cfgTraps]
cfgTrapsDestIpAddr=<IP_ADDRESS>
'
'
NOTE: Type racadm getconfig -f <myexample>.cfg. This command builds a .cfg file for
the current DRAC 4 configuration. This configuration file can be used as an example and as a starting
point for your unique .cfg file.
Configuration File Example
The following example describes the IP address of the DRAC 4. Remove all unnecessary <variable>=value entries. In this situation, only the actual variable group's label with "[" and "]" will remain along with the two <variable>=value entries pertaining to the IP address change.
The file contents are as follows:
#
# Object Group "cfgLanNetworking"
#
[cfgLanNetworking]
cfgNicIpAddress=10.35.10.110
cfgNicGateway=10.35.10.1
This file will be updated as follows:
#
# Object Group "cfgLanNetworking"
#
[cfgLanNetworking]
cfgNicIpAddress=10.35.9.143
# comment, the rest of this line is ignored
cfgNicGateway=10.35.9.1
The command racadm config -f myfile.cfg parses this file and identifies any errors by line number. A correct file will update the proper entries. You may use the same getconfig command used in the previous example to confirm the update.
You can use this file to download company-wide changes or to configure new systems over the network.
Using the racadm Utility to Configure the DRAC 4
The DRAC 4 Web-based interface is the fastest way to configure a DRAC 4. If you prefer command-line or script configuration, or need to configure multiple DRAC 4s, you can also use the racadm CLI. The racadm CLI is installed along with the DRAC 4 agents on the managed system.
To configure multiple DRAC 4s to contain the same user configuration settings, you can do either of the following:
Use the racadm CLI examples in this section as a guide to create a batch file of racadm commands, and then execute the batch file on each managed system.
Create the DRAC 4 configuration file as described in "racadm Subcommand Man Pages" and then execute the racadm config subcommand on each managed system using that same configuration file.
Before Adding a DRAC 4 User
The DRAC 4 allows up to 16 users to be configured into the DRAC 4 property database. Before manually adding the DRAC 4 user, you need to know which, if any, users exist. If the DRAC 4 is new, or the racadm racresetcfg command has been run, then the only user is root with the password calvin. The racresetcfg subcommand resets the DRAC 4 back to the original defaults.
NOTICE: Use caution when using this command because all configuration parameters are reset to the
original defaults; any previous changes are lost.
NOTE: Users can be added and deleted over time, so it is possible that users on the DRAC 4 do not have
the same index number as the same user on a different DRAC 4.
To find out if a user exists, you can type the following command at the command prompt:
racadm getconfig -u <username>
or you can type the following command once for each index of 116:
racadm getconfig -g cfgUserAdmin -i <index>
NOTE: An alternate method to obtain this information is to type racadm getconfig -f
<myfile.cfg>, then view or edit the myfile.cfg file, which includes all DRAC 4 configuration
parameters.
Several parameters and object IDs are displayed along with their current values. The two objects of interest are:
# cfgUserAdminIndex=XX
cfgUserAdminUserName=
If the cfgUserAdminUserName object has no value, that index number, which is indicated by the cfgUserAdminIndex object, is available for use. If a name appears after the "=," that index is taken by that user name.
NOTE: When you manually add or remove a user with the racadm config subcommand, you must specify
the index with the -i option. Observe that the cfgUserAdminIndex object displayed in the previous
example contains a '#' character. Also, if you use the racadm config -f racadm.cfg command to specify
any number of groups/objects to write, the index cannot be specified. A new user is added to the first
available index. This behavior allows more flexibility in configuring multiple DRAC 4s with the same settings.
Adding a DRAC 4 User Without Alert Capabilities
To add a simple user without any alert information, first locate an available user index by performing the steps in "Before Adding a DRAC 4 User." Next, type the following two command lines with the new user name and password:
A user name "john" with the password of "123456" is created. This user name and password can now be used to log into the Web-based remote access interface. You can verify this using either of the following two commands:
racadm getconfig -u john
racadm getconfig -g cfgUserAdmin -i 2
Deleting a DRAC 4 User
All users must be deleted manually. You cannot delete users by specifying them in a racadm.cfg file.
To delete the user "john" created in the previous example, type the following command line:
A null string of double quote characters("") indicates to the DRAC 4 to delete the index for the specified group.
Adding a DRAC 4 User With Alerting Capabilities
To add a DRAC 4 user that is able to receive email and SNMP traps, first locate an available DRAC 4 user index by performing the steps in "Before Adding a DRAC 4 User." The following example has an available user index at index 2.
You can type the commands manually, run a batch file, or build a .cfg file using the command racadm config -f racadm.cfg. After doing so, you may want to test each of the alerts.
Testing Email Alerting
Email alerting is enabled by the following command. A "0" disables this feature; a "1" enables it.
To add a user with specific administrative permissions (role-based authority), first locate an available user index by performing the steps in "Before Adding a DRAC 4 User." Next, type the following command lines with the new user name and password.
NOTE: See Table B-1 for a list of the Bit Mask numbers to enable specific user permissions. The default
user permission is 0, which provides full admininstrative permission.
racadm config -g cfgUserAdmin -o cfgUserAdminPrivilege -i <index> <username> <Bit Mask Number for specific user permissions>
Configuring DRAC 4 Network Properties
Type the following command to get a list of the available network properties:
racadm getconfig -g cfgLanNetworking
If you want to use DHCP to obtain an IP address, you can use the command to write the object cfgNicUseDhcp to enable it. You may also type a static IP address, netmask, and gateway.
The commands provide the same configuration functionality as the option ROM does at boot-up time when you are prompted to type <Ctrl><d>. For more information about configuring network properties with the option ROM, see "Configuring DRAC 4 Network Properties."
The following is an example of how the command may be used to configure desired LAN network properties.
NOTE: If cfgNicEnable is set to 0, the DRAC 4 LAN is disabled even if DHCP is enabled.
Frequently Asked Questions
Table 8-6 lists frequently asked questions and answers.
Table 8-6. Using the serial and racadm Commands: Frequently Asked Questions
Question
Answer
After performing a DRAC 4 reset (using the racadm racreset command), I issue a command and the following message is displayed: racadm <command name> Transport: ERROR: (RC=-1). What does this message mean?
You must wait until the DRAC 4 completes the reset before issuing another command.
When I use the racadm commands and subcommands, I get errors that I don't understand.
You may encounter one or more of the following errors when using the racadm commands and subcommands:
Local error messages Occur when problems occur with syntax, typographical errors, incorrect names, and so on.
Example:
racadm <subcmd>: ERROR: <message>
Transport error messages Occur when the racadm CLI communication paths to the DRAC 4 are not accessible. Transport error messages occur if Server Administrator is not running when the command is executed.
If you are using the racadm CLI remotely, transport error messages may indicate network communication problems or that the management station is unable to communicate with the DRAC 4.
Example:
racadm <subcmd> : Transport : ERROR : <message>
DRAC 4 firmware errors Occur when a fault exists in the DRAC 4 firmware operation.