Display Solaris System Configuration with prtconf

The prtconf command is a valuable tool for determining the devices attached to a Solaris system. The total system memory is prominently displayed and the devices and peripherals attached to the system are displayed in a tree format.


Any user can run /usr/sbin/prtconf. Without any options, it displays useful information about the system. At the top of the output are lines like these:

System Configuration: Sun Microsystems sun4u
Memory size: 2048 Megabytes

The first line shows the system architecture, sun4u. The next line shows the total memory in the system. Pipe this command through grep as seen below:

/usr/sbin/prtconf | grep Memory

The example above is a quick way to find this value without wading through the device tree that follows.

Devices attached to the system are displayed in a hierarchial tree. The list is comprehensive, including potential devices that are not currently attached. Seeing a line ending in “(driver not attached)” indicates that there is not a corresponding device. Take, for instance, the following example:

pci, instance #2
scsi, instance #0
disk (driver not attached)
tape (driver not attached)
sd, instance #0
sd, instance #1
sd, instance #2 (driver not attached)
sd, instance #4 (driver not attached)

This output snippet shows two PCI-attached hard drives (sd, instance #0 and #1), but no disk, tape, or additional hard drives. To simplify the output, it may be helpful to filter out what is not present with the following:

prtconf | grep -v "not attached"

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.