C H A P T E R  2

Command Line Interface

The following procedures are discussed in this chapter:



Note - There is no need to enable dynamic reconfiguration explicitly on Sun Fire 6800, 4810, 4800, nor 3800 systems. DR is enabled by default.



 

 


The cfgadm Command

The cfgadm(1M) command provides configuration administration operations on dynamically reconfigurable hardware resources. The following table lists the DR board states.

TABLE 2-1 DR Board States from the System Controller (SC)

Board States

Description

Available

The slot is not assigned to any particular domain.

Assigned

The board belongs to a domain, but the hardware has not been configured to use it. The board may be reassigned by the chassis port or released by the domain that it is assigned to.

Active

The board is being actively used by the domain to which it has been assigned. You cannot reassign an active board.


Displaying Basic Board Status

The cfgadm program displays information about boards and slots. Refer to the cfgadm(1) man page for options to this command.

Many operations require that you specify the system board names. To obtain these system names, type:

# cfgadm

When used without options, cfgadm displays information about all known attachment points, including board slots, SCSI buses, and cPCI slots. The following display shows a typical output.

 

Ap_Id         Type         Receptacle   Occupant     Condition
N0.IB6        PCI_I/O_Boa  connected    configured   ok
N0.IB7        PCI_I/O_Boa  connected    configured   ok
N0.IB8        PCI_I/O_Boa  connected    configured   ok
N0.IB9        PCI_I/O_Boa  disconnected unconfigured unknown
N0.SB0        CPU_Board    connected    configured   unknown
N0.SB1        CPU_Board    disconnected unconfigured failed
N0.SB2        CPU_Board    connected    configured   ok
N0.SB3        unknown      empty        unconfigured unknown
N0.SB4        unknown      empty        unconfigured unknown
N0.SB5        unknown      empty        unconfigured unknown
c0            scsi-bus     connected    configured   unknown
c1            scsi-bus     connected    unconfigured unknown
c2            scsi-bus     connected    unconfigured unknown
c3            scsi-bus     connected    configured   unknown
CODE EXAMPLE 2-1 Output of the Basic cfgadm Command
# cfgadm

Displaying Detailed Board Status

For a more detailed status report, use the command cfgadm -av. The -a option lists attachment points and the -v option turns on expanded (verbose) descriptions.

CODE EXAMPLE 2-2 is a partial display produced by the cfgadm -av command. The output appears complicated because the lines wrap around in this display. (This status report is for the same system shown on "Invalid Cross-Reference" , and provides details of each display item.)

 

CODE EXAMPLE 2-2 Output of the cfgadm -av Command
# cfgadm -av
Ap_Id            Receptacle    Occupant       Condition  Information
When          Type          Busy       Phys_Id
N0.IB6           connected     configured     ok        powered-on, assigned
Apr  3 18:04  PCI_I/O_Boa   n          /devices/ssm@0,0:N0.IB6
N0.IB6::pci0     connected     configured     ok        device /ssm@0,0/pci@19,70000
Apr  3 18:04 io             n          /devices/ssm@0,0:N0.IB6::pci0
N0.IB6::pci1     connected     configured     ok        device /ssm@0,0/pci@19,600000
Apr  3 18:04 io             n          /devices /ssm@0,0:N0.IB6::pci1
N0.IB6::pci2     connected    configured      ok        device /ssm@0,0/pci@18,700000
Apr  3 18:04 io             n          /devices/ssm@0,0:N0.IB6::pci2
N0.IB6::pci3     connected     configured     ok        device /ssm@0,0/pci@18,600000
Apr  3 18:04 io             n          /devices/ssm@0,0:N0.IB6::pci3
N0.IB7           connected     configured     ok        powered-on, assigned
Apr  3 18:04 PCI_I/O_Boa    n          /devices/ssm@0,0:N0.IB7
N0.IB7::pci0     connected     configured     ok        device /ssm@0,0/pci@1b,700000
Apr  3 18:04 io             n          /devices/ssm@0,0:N0.IB7::pci0
N0.IB7::pci1     connected     configured     ok        device /ssm@0,0/pci@1b,600000
Apr  3 18:04 io             n          /devices/ssm@0,0:N0.IB7::pci1
N0.IB7::pci2     connected     configured     ok        device /ssm@0,0/pci@1a,700000
Apr  3 18:04 io             n          /devices/ssm@0,0:N0.IB7::pci2
N0.IB7::pci3     connected     configured     ok        device /ssm@0,0/pci@1a,600000
Apr  3 18:04 io             n          /devices/ssm@0,0:N0.IB7::pci3
N0.IB8           connected     configured     ok        powered-on, assigned
Apr  3 18:04 PCI_I/O_Boa    n          /devices/ssm@0,0:N0.IB8
N0.IB8::pci0     connected     configured     ok        device /ssm@0,0/pci@1d,700000
Apr  3 18:04 io             n         /devices/ssm@0,0:N0.IB8::pci0
N0.IB8::pci1     connected     configured     ok        device /ssm@0,0/pci@1d,600000
Apr  3 18:04 io             n         /devices/ssm@0,0:N0.IB8::pci1
N0.IB8::pci2     connected     configured     ok        device /ssm@0,0/pci@1c,700000, referenced
Apr  3 18:04 io             n        /devices/ssm@0,0:N0.IB8::pci2
N0.IB8::pci3     connected     configured     ok        device /ssm@0,0/pci@1c,600000, referenced
Apr  3 18:04 io             n        /devices/ssm@0,0:N0.IB8::pci3
N0.IB9           disconnected  unconfigured   unknown  powered-on, assigned
Apr  3 18:04 PCI_I/O_Boa    n        /devices/ssm@0,0:N0.IB9
N0.SB0           connected     configured     unknown  powered-on, assigned
Apr  3 18:04 CPU_Board      n        /devices/ssm@0,0:N0.SB0
N0.SB0::cpu0     connected     configured     ok        cpuid 0, speed 750 MHz, ecache 8 MBytes
Apr  3 18:04 cpu            n       /devices/ssm@0,0:N0.SB0::cpu0
N0.SB0::cpu1     connected     configured     ok        cpuid 1, speed 750 MHz, ecache 8 MBytes
Apr  3 18:04 cpu            n       /devices/ssm@0,0:N0.SB0::cpu1
N0.SB0::cpu2     connected     configured     ok        cpuid 2, speed 750 MHz, ecache 8 MBytes
Apr  3 18:04 cpu            n       /devices/ssm@0,0:N0.SB0::cpu2

Here are some details of the previous display:

  FIGURE 2-1 Details of the Display for cfgadm -av

 

Command Options

The options to the cfgadm -c command are listed below:

TABLE 2-2 cfgadm -c Command Options

cfgadm -c Option

Function

connect

The slot provides power to the board and begins monitoring the board. The slot is assigned if it was not previously assigned.

disconnect

The system stops monitoring the board and power to the slot is turned off.

configure

The operating system assigns functional roles to a board and loads device drivers for the board and for the devices attached to the board.

unconfigure

The system detaches a board logically from the operating system and takes the associated device drivers offline. Environmental monitoring continues, but any devices on the board are not available for system use.


The options provided by the cfgadm -x command are listed below.

TABLE 2-3 cfgadm -x Command Options

cfgadm -x Option

Function

assign

Adds (assigns) a board to a domain.

unassign

Deletes (unassigns) a board from a domain.

poweron

Powers on a system board.

poweroff

Powers off a system board.


The cfgadm_sbd man page provides additional information on the cfgadm -c and cfgadm -x options. The sbd library provides the functionality for hot-plugging system boards of the class sbd, through the cfgadm framework.


Testing Boards and Assemblies


procedure icon   To Test a CPU/Memory Board

Before you can test a CPU/Memory board, it must first be assigned to a domain, powered-on, and disconnected. If all these conditions are not met, the board test fails.

You can use the Solaris cfgadm command to test CPU/memory boards. As superuser type:

# cfgadm -t ap-id

To change the level of diagnostics that cfgadm runs, supply a diagnostic level for the cfgadm command as follows.

# cfgadm -o platform=diag=<level> -t ap-id

where level is a diagnostic level, and ap-id is an attachment point identifier.

If you do not supply level , the default diagnostic level is set by the setupdomain command, which is described in both the Sun Fire 6800/4810/4800/3800 Systems Platform Administration Manual and the Sun Fire 6800/4810/4800/3800 Systems Controller Command Reference Manual. The diagnostic levels are:

TABLE 2-4 Diagnostic Levels

Diagnostic Level

Description

init

Only system board initialization code is run. No testing is done. This is a very fast pass through the POST.

quick

All system board components are tested with few tests and test patterns.

default

All system board components are tested with all tests and test patterns, except for memory and Ecache modules. Note that max and default are the same definition.

max

All system board components are tested with all tests and test patterns, except for memory and Ecache modules. Note that max and default are the same definition.

mem1

Runs all tests at the default level, plus more exhaustive DRAM and SRAM test algorithms. For Memory and Ecache modules, all locations are tested with multiple patterns. More extensive, time-consuming algorithms are not run at this level.

mem2

The same as mem1, with the addition of a DRAM test that does explicit compare operations of the DRAM data.



procedure icon   To Test an I/O Assembly

An I/O assembly should be tested before it is added to a domain.

In order to test an I/O assembly you must have a spare domain that is not running the Solaris operating environment.

1. Enter the domain shell of a spare domain (A-D) that is NOT running the Solaris operating environment and that has at least one CPU/Memory board.

2. Press and hold the CTRL key while pressing the ] key to bring up the telnet> prompt. Type send break to display the system controller domain shell.



Note - In this example, domain A is the current, active domain; and domain B is the spare domain.



3. In the spare domain (B) shell, add the I/O assembly to the domain with the addboard command.

schostname:B> addboard IBx

where x is 6, 7, 8, or 9.

4. Set the virtual keyswitch in the spare domain to on.

schostname:B> setkeyswitch on
.
.
{x} ok

where x represents the CPU. POST is run on the domain when you turn the virtual keyswitch to on. If you see the ok prompt, the I/O assembly is functioning properly.

5. Type:

schostname:B> setkeyswitch standby

6. Delete the board by entering:

schostname:B> deleteboard ibx

7. On the active domain (A) add the board using the following command:

# cfgadm -c configure N0.IBx


Installing or Replacing Boards


procedure icon   To Install a New Board in a Domain



caution icon

Caution - For complete information about physically removing and replacing boards, refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual. Failure to follow the stated procedures can result in damage to system boards and other components. Also refer to the Sun Fire 6800/4810/4800/3800 Systems Platform Administration Manual for more information about software procedures related to removing and replacing boards and components.





Note - When replacing boards, you sometimes need filler panels. A fully configured Sun Fire 6800/4810/4800/3800 system ships with three different filler panels: one system board filler panel, one CompactPCI filler panel, and one L2 Repeater Board filler panel.



If you are unfamiliar with how to insert a board into the system, get a copy of the Sun Fire 6800/4810/4800/3800 Systems Service Manual before you begin this procedure.

1. Identify an empty slot available to the domain by typing the following as superuser:

# cfgadm -l -s "select=class(sbd)"

2. Make sure you are properly grounded with a wrist strap.

3. After locating the empty slot, remove the system board filler panel from the slot.

4. Insert the board into the slot within one minute to prevent system overheating.

Refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual for complete step-by-step board insertion procedures.

5. Power on, test, and configure the board using the cfgadm -c configure command.

# cfgadm -c configure ap_id

where ap_id is the attachment point ID returned by
cfgadm -l -s "select=class(sbd)" .


procedure icon   To Hot-Swap a CPU/Memory Board



caution icon

Caution - For complete information about physically removing and replacing boards, refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual. Failure to follow the stated procedures can result in damage to system boards and other components.





Note - Hot-swapping is initiated by the user by pressing the card's ejector lever fully while the card is inserted; or by disengaging the ejector lever partially before the card is removed. The operator does not need to issue any commands to perform a hot swap. Hot-plugging, on the other hand, is accomplished using the cfgadm command.



1. If the board is being used by the Solaris operating environment, as superuser identify the board to be removed.

You must know the slot number (attachment point ID).

# cfgadm -l -s "select=class(sbd)"

2. Make sure you are properly grounded using a wrist strap.

3. Detach the board from the domain and power off the board with cfgadm .

# cfgadm -c disconnect ap_id

where ap_id is the attachment point ID.

This command removes the resources from the Solaris operating environment and the OpenBoot PROM, detaches the board from the domain, and powers off the board.

4. Verify the state of the Power and Hotplug OK LEDs.

The green Power LED will flash shortly as the CPU/Memory board is cooling down. In order to safely remove the board from the systems the green Power LED
must be off and the amber Hotplug OK LED must be on.

5. Complete the hardware removal and installation of the board. For more information refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual.

6. After removing and installing board, bring the board back to the Solaris operating environment with the Solaris dynamic reconfiguration cfgadm command .

# cfgadm -c configure ap_id

where ap_id is the attachment point ID.

This command assigns the board to the domain, powers it on, tests it, attaches the board, and brings all of its resources back to the Solaris operating environment.

7. Verify that the green Power LED is lit.


procedure icon   To Hot-Swap an I/O Assembly

There are two types of I/O assemblies: CompactPCI (cPCI) and standard PCI. These instructions apply to both types. Note, however, that while cPCI cards can be hot-swapped, hot-plugged, and dynamically re-configured, PCI cards and standard I/O assemblies cannot be hot-swapped, hot-plugged, nor dynamically reconfigured.

Hot-swapping is initiated by the user by pressing the card's ejector lever fully while the card is inserted; or by disengaging the ejector lever partially before the card is removed. The operator does not need to issue any commands to perform a hot swap. Hot-plugging, on the other hand, is accomplished using the cfgadm command.



caution icon

Caution - For complete information about physically removing and replacing boards, refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual. Failure to follow the stated procedures can result in damage to system boards and other components.



1. If the I/O assembly is being used by the Solaris operating environment, as superuser in the Solaris operating environment, identify the I/O assembly to be removed.

You must know the slot number (attachment point ID).

# cfgadm -l -s "select=class(sbd)"

2. Detach the board from the domain and power off the board with cfgadm :

# cfgadm -c disconnect ap_id

Where: ap_id is the attachment point ID.

This command removes the resources from the Solaris operating environment and the OpenBoot PROM, detaches the board from the domain, and powers off the I/O assembly.

3. Remove the board from the domain with cfgadm :

# cfgadm -x unassign ap_id

4. Verify the state of the status LEDs on the I/O assembly.

In order to safely remove the I/O assembly from the system, the green Power LED on the I/O assembly must be in the deactivated state (off) and the amber Hotplug OK LED must be lit.

5. Complete the hardware removal and installation of the I/O assembly. For more information see the Sun Fire 6800/4810/4800/3800 Systems Service Manual .



Note - Be sure you are properly grounded before you begin the hardware removal and installation of the I/O assembly.



Before you bring the board back to the Solaris operating environment, you need to enter a spare domain that is NOT running the Solaris operating environment and that has at least one CPU/Memory board in order test the I/O assembly.

Enter the domain shell of a spare domain (A-D) that is NOT running the Solaris operating environment and that has at least one CPU/Memory board.

6. Press and hold the CTRL key while pressing the ] key to bring up the telnet> prompt. Type send break to display the system controller domain shell.



Note - In this example, domain A is the current, active domain; and domain B is used as a spare domain.



7. In the spare domain shell, add the I/O assembly to the domain with the addboard command.

schostname:B> addboard ibx

where x is 6, 7, 8, or 9.

8. Set the virtual keyswitch in the spare domain to on.

POST is run on the domain when you turn the virtual keyswitch to on.

schostname:B> setkeyswitch on
.
.
{x} ok

where x represents the CPU. If you see the ok prompt, the I/O assembly is functioning properly.

9. Press and hold the CTRL key while pressing the ] key to bring up the telnet> prompt. Type send break to connect to the system controller domain shell.

Depending on the type of telnet connection, you may need to type send esc followed by send break to connect to the system controller domain shell.

10. Type:

schostname:B> setk standby

11. Delete the board by entering:

schostname:B> deleteboard ibx

12. At the Solaris prompt in domain A configure the I/O assembly:

# cfgadm -c configure N0.IBx

 

Hot-Swapping a CompactPCI Card

You can initiate hot-swapping by pressing the card's ejector lever fully while the card is inserted; or by disengaging the ejector lever partially before the card is removed. You do not need to issue any commands to perform a hot swap. To perform a hot-plug operation, on the other hand, use the cfgadm command.

In order to hot-swap a CompactPCI (cPCI) card, you must boot the Solaris software in the domain where the cPCI card I/O assembly resides. When the Solaris software is booted in the domain, all cPCI cards are in the autoconfigure mode, and all configuring and unconfiguring can be performed without the cfgadm command.

When you insert a cPCI card using hot-swap, the card is automatically powered on and configured. When you remove a cPCI card using hot-swap, the card is automatically unconfigured and powered off.



caution icon

Caution - For complete information about physically removing and replacing boards, refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual. Failure to follow the stated procedures can result in damage to system boards and other components.




procedure icon   To Insert a CompactPCI Card

1. As superuser, identify the slot into which the card will be inserted.

2. Insert the card and push down on the ejector lever fully to engage it reliably. The card will be automatically powered-on and configured. The blue Hotswap OK LED on the card should be off, the green Power LED on the I/O assembly should be lit, and the amber Hotplug OK LED should be off. Insertion using hot-swap is equivalent to typing the following command: cfgadm -c configure ap_id.


procedure icon   To Remove a CompactPCI Card



Note - Before you hot-swap the CompactPCI (cPCI) card, make sure that there is no I/O activity on that card.



1. Disengage the ejector lever slightly to deactivate the card.

2. Make sure the blue Hotswap OK LED on the card is lit, the amber Hotplug OK LED on the I/O assembly is lit, and the green Power LED on the assembly is off.

3. Remove the card.

If the domain console is available, a message confirms that the card has been unconfigured.


procedure icon   To Hot-Plug a CompactPCI Card

Hot-plugging is accomplished by using the cfgadm command. You perform a hot-swap operation, on the other hand, by pressing the card's ejector lever fully while the card is inserted; or by disengaging the ejector lever partially before the card is removed. You never need to issue any commands to perform a hot swap.

1. As superuser, identify the cPCI card to be removed.

You must know the slot number (attachment point ID).

# cfgadm -s "select=class(pci)"

2. Detach (unconfigure) the cPCI card to be removed:

# cfgadm -c unconfigure ap_id

where ap_id is the attachment point ID. The card is automatically unconfigured and powered-off.

3. Confirm that the card is detached.

# cfgadm -s "select=class(pci)" ap_id

4. Inspect the green Power LED and the amber Hotplug OK LED on the I/O assembly and the blue Hotswap OK LED on the cPCI card.

When the green Power LED on the I/O assembly is off, the amber Hotplug OK LED on the I/O assembly is lit, and the blue Hotswap OK LED on the cPCI card if lit, it is safe to remove the cPCI card.

5. After ensuring that you are properly grounded using a wrist strap, remove and replace the cPCI card.



caution icon

Caution - For complete information about physically removing and replacing boards, refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual. Failure to follow the stated procedures can result in damage to system boards and other components.



6. After installing the card, attach (configure) the card:

# cfgadm -c configure ap_id

When Solaris boots in a domain, all cPCI slots in that domain are in the autoconfigure mode by default. In autoconfigure mode hot-swap is enabled for each slot.



Note - To disable the Autoconfiguration feature, use the following command: cfgadm -x disable_autoconfig ap_id. To re-enable Autoconfiguration, use the following command: cfgadm -x enable_autoconfig ap_id.



7. Inspect the green Power LED.

The green Power LED on the I/O assembly will be lit and the blue Hotswap OK LED on the cPCI card should be off.

8. Verify that the card is attached.

# cfgadm -s "select=class(pci)" ap_id


procedure icon   To Remove a Board From the System



Note - Before you begin this procedure, make sure you have ready a system board filler panel to replace the system board you are going to remove from the system. A system board filler panel is a metal board with slots that allow cooling air to circulate.



1. Identify the board to be removed.

You must know the slot number.

# cfgadm -l -s "select=class(sbd)"

2. Detach and power off the board from the domain by using the cfgadm -c disconnect command.

# cfgadm -c disconnect ap_id

where ap_id is the attachment point ID returned by
cfgadm -al -s select=class(sbd) .



caution icon

Caution - For complete information about physically removing and replacing boards, refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual. Failure to follow the stated procedures can result in damage to system boards and other components.



3. Remove the board from the system.

Refer to the Sun Fire 6800/4810/4800/3800 Systems Service Manual for complete step-by-step board removal procedures.

4. Insert a system board filler panel into the slot within one minute of removing the board to prevent system overheating.


procedure icon   To Move a Board Between Domains

1. Identify the slot number of the board to be removed.

# cfgadm -l -s "select=class(sbd)"

2. Unconfigure the board but leave the power on to preserve the test status:

# cfgadm -o unassign,nopoweroff -c disconnect ap_id

where ap_id is the attachment point ID returned by
cfgadm -l -s "select=class(sbd)" .

At this point, the slot is not assigned to any domain, and the slot is visible to all domains.

3. In the domain to which you are moving the board, check to see if the board is now visible as disconnected.

# cfgadm -al -s select=class(sbd)

4. Configure the board in the new domain using the cfgadm -c configure command, which implies an assignment operation.

# cfgadm -c configure ap_id


procedure icon   To Disconnect a Board Temporarily

You can use DR to power down the board and leave it in place. For example, you might want to do this if the board fails and a replacement board or a system board filler panel is not available.

1. Identify the board to be removed.

You must know the slot number.

# cfgadm -l -s "select=class(sbd)"

2. Detach and power off the board from the domain by using the cfgadm -c disconnect command.

# cfgadm -c disconnect ap_id

where ap_id is the attachment point ID returned by
cfgadm -l -s "select=class(sbd)" .