Americas

  • United States
sandra_henrystocker
Unix Dweeb

Using prtdiag to troubleshoot system problems

Analysis
Oct 15, 20084 mins
Business IntelligenceData CenterOpen Source

The prtdiag command on Solaris systems is both a script and an executable. The script, /usr/sbin/prtdiag, does a little fact checking — such as whether your “uname -i” command yields a proper response; it should be your platform designation (e.g., SUNW,Sun-Fire-V240) and then runs the “real” prtdiag from its /usr/platform location. On a Sun Fire V240, for example, that location should be /usr/platform/SUNW,Sun-Fire-V240/sbin/prtdiag. The /usr/platform/`uname -i`/sbin/prtdiag command should work on any system. The command at this location is the binary that collects the information that prtdiag displays.

Even without its verbose (-v) option, prtdiag provides a lot of information on your system’s components, including a status indicators such as “okay” and “online” for various system components. The output shown below is a portion of the prtdiag output, showing the status of I/O devices. It took me a while to realize that “MB” represents the motherboard.

================================= IO Devices =================================
Bus     Freq  Slot +      Name +
Type    MHz   Status      Path                          Model
------  ----  ----------  ----------------------------  --------------------
pci     66    MB          pci108e,1648 (network)
              okay        /pci@1f,700000/network@2

pci     66    MB          pci108e,1648 (network)
              okay        /pci@1f,700000/network@2,1

pci     33    MB          isa/su (serial)
              okay        /pci@1e,600000/isa@7/serial@0,3f8

pci     33    MB          isa/su (serial)
              okay        /pci@1e,600000/isa@7/serial@0,2e8

pci     33    MB          pci10b9,5229 (ide)
              okay        /pci@1e,600000/ide@d

pci     66    MB          scsi-pci1000,21 (scsi-2)
              okay        /pci@1c,600000/scsi@2
...

The following portion of the prtdiag output illustrates the memory layout on the box. The system being interrogated has 2 GB of memory in four 512 MB DIMMs.

============================ Memory Configuration ============================
Segment Table:
-----------------------------------------------------------------------
Base Address       Size       Interleave Factor  Contains
-----------------------------------------------------------------------
0x0                2GB               4           BankIDs 0,1,2,3

Bank Table:
-----------------------------------------------------------
           Physical Location
ID       ControllerID  GroupID   Size       Interleave Way
-----------------------------------------------------------
0        0             0         512MB           0,1,2,3
1        0             1         512MB
2        0             1         512MB
3        0             0         512MB

With the verbose (-v) option, prtdiag will produce roughly twice as much output. For example, the verbose option adds fan speeds plus temperature, voltage and current sensors to the display. The state of system LEDs, for example, will be displayed in a table such as the one shown below. As you can see, each LED has a state (ON or OFF) and a color. Amber LEDs are meant to indicate problems, so an LED which shows “ON” and “amber” would indicate a problem to be looked into.

--------------------------------------------------
Led State:
--------------------------------------------------
Location   Led                   State       Color
--------------------------------------------------
      -    fault                 OFF         amber
      -    power                 ON          green


      -    locator               OFF         white
      -    top_access            OFF         amber
      -    alarm1                OFF         amber
      -    alarm2                OFF         amber
      -    system                ON          green
      -    supplyA               ON          green
      -    supplyB               ON          green
DISK0      fault                 OFF         amber
DISK0      power                 ON          green
DISK0      ok_to_remove          OFF         blue
...

The prtdiag output might display the ON/OFF in either uppercase or lowercase, so you could compose a quick check of your LEDs like this:

# prtdiag -v | grep -i on | grep amber
MB                     SERVICE               ON          amber

In this example, we see that an amber LED on the motherboard is lit, indicating a fault of some kind.

While the prtdiag command is extremely ueful, the prtdiag man page is woefully inadequate. It barely explains the two available command options and doesn’t provide any detail on how you should interpret thecommand’s output — not even to explain what the acronyms — like “HDD0” and “PS0” — represent. To dispel the mystery of prtdiag’s output, here’s a list of theacronyms I’ve decoded to date (“?” representing an integer unit number, such as in “HDD0”):

B?   bus on I/O assembly
C?   I/O card in the I/O assembly
F?   fan
FT?  fan tray
HDD? disk drive
IB?  I/O assembly (slot)
MB?  motherboard
P?   port on I/O assembly
PCI? PCI board
PS?  power supply
RP?  repeater board
SB?  CPU/memory board slot (system board)
SSC? system config card
sandra_henrystocker
Unix Dweeb

Sandra Henry-Stocker has been administering Unix systems for more than 30 years. She describes herself as "USL" (Unix as a second language) but remembers enough English to write books and buy groceries. She lives in the mountains in Virginia where, when not working with or writing about Unix, she's chasing the bears away from her bird feeders.

The opinions expressed in this blog are those of Sandra Henry-Stocker and do not necessarily represent those of IDG Communications, Inc., its parent, subsidiary or affiliated companies.

More from this author