System Administration Guide, Volume 1

Chapter 24 Device Management (Overview)

The chapter provides overview information about managing peripheral devices in the Solaris environment.

This is a list of overview information in this chapter.

For information about accessing devices, see Chapter 26, Accessing Devices (Overview).

Device management in the Solaris environment usually includes adding and removing peripheral devices from systems, possibly adding a third-party device driver to support a device, and displaying system configuration information.

What's New in Device Management?

This section provides information about new Solaris 8 features related to device management.

SCSI and PCI Hot-Plugging

The cfgadm command is updated in this release to provide SCSI and PCI hot-plugging for supported SCSI and PCI controllers on SPARC based and IA based systems.

Hot plugging is the ability to physically add, remove, or replace system components while the system is running. Dynamic reconfiguration, available on certain SPARC servers, allows a service provider to remove and replace hot-pluggable system I/O boards in a running system, eliminating the time lost in rebooting. Also, if a replacement board is not immediately available, the system administrator can use dynamic reconfiguration to shut down a failing board while allowing the system to continue operation.

See your SPARC hardware manufacturer's documentation for information about whether dynamic reconfiguration is supported on your system. See the Solaris 8 (Intel Platform Edition) Hardware Compatibility List to verify whether your PCI controller supports hot-plugging.

Chapter 25, Configuring Devices describes how to use the cfgadm command to hot-plug SCSI or PCI controllers.

Improved Device Configuration (devfsadm)

The devfsadm command manages the special device files in the /dev and /devices directories. By default, devfsadm attempts to load every driver in the system and attach to all possible device instances. Then it creates the device files in the /devices directory and the logical links in the /dev directory. In addition to managing the /dev and /devices directories, devfsadm also maintains the path_to_inst(4) instance database.

In previous Solaris releases, device configuration was handled by drvconfig, which managed the physical device entries in the /devices directory, and five link generators, devlinks, disks, tapes, ports, and audlinks, which managed the logical device entries in the /dev directory.

These utilities were not aware of hot-pluggable devices nor were they flexible enough for devices with multiple instances. For compatibility purposes, drvconfig and the other link generators are symbolic links to the devfsadm utility. See Chapter 25, Configuring Devices for information about hot-pluggable devices.

Both reconfiguration boot processing and updating the /dev and /devices directories in response to dynamic reconfiguration events is handled by devfsadmd, the daemon version of the devfsadm command. This daemon is started from the /etc/rc* scripts when a system is booted.

Since devfsadmd automatically detects device configuration changes generated by any reconfiguration event, there is no need to run this command interactively.

See devfsadm(1M) for more information.

Where to Find Device Management Tasks

The following table describes where to find step-by-step procedures for adding serial devices, such as printers and modems, and peripheral devices, such as a disk, CD-ROM, or tape drive, to your system.

Table 24-1 Where to Find Instructions for Adding a Device

For Information On ... 

See the Following  

Adding a disk 

Chapter 30, SPARC: Adding a Disk (Tasks) or Chapter 31, IA: Adding a Disk (Tasks)

Adding a CD-ROM or tape device  

"How to Add a Peripheral Device"

Adding a modem 

"Managing Terminals and Modems (Overview)" in System Administration Guide, Volume 2

Adding a printer 

"Print Management (Overview)" in System Administration Guide, Volume 2

About Device Drivers

A computer typically uses a wide range of peripheral and mass-storage devices. Your system, for example, probably has a SCSI disk drive, a keyboard and a mouse, and some kind of magnetic backup medium. Other commonly used devices include CD-ROM drives, printers and plotters, light pens, touch-sensitive screens, digitizers, and tablet-and-stylus pairs.

The Solaris software does not directly communicate with all these devices. Each type of device requires different data formats, protocols, and transmission rates.

A device driver is a low-level program that allows the operating system to communicate with a specific piece of hardware. The driver serves as the operating system's "interpreter" for that piece of hardware.

Automatic Configuration of Devices

The kernel, consisting of a small generic core with a platform-specific component and a set of modules, is configured automatically in the Solaris environment.

A kernel module is a hardware or software component that is used to perform a specific task on the system. An example of a loadable kernel module is a device driver that is loaded when the device is accessed.

The platform-independent kernel is /kernel/genunix. The platform-specific component is /platform/`uname -m`/kernel/unix.

The kernel modules are described in the following table.

Table 24-2 Description of Kernel Modules


This Directory Contains ... 

/platform/`uname -m` /kernel

Platform-specific kernel components 


Kernel components common to all platforms that are needed for booting the system 


Kernel components common to all platforms within a particular instruction set 

The system determines what devices are attached to it at boot time. Then the kernel configures itself dynamically, loading needed modules into memory. At this time, device drivers are loaded when devices, such as disk and tape devices, are accessed for the first time. This process is called autoconfiguration because all kernel modules are loaded automatically when needed.

You can customize the way in which kernel modules are loaded by modifying the /etc/system file. See system(4) for instructions on modifying this file.

Features and Benefits

The benefits of autoconfiguration are:

The autoconfiguration process is used by a system administrator when adding a new device (and driver) to the system. At this time, the administrator performs a reconfiguration boot so the system will recognize the new device.

What You Need for Unsupported Devices

Device drivers needed to support a wide range of standard devices are included in the Solaris environment. These drivers can be found in the /kernel/drv and /platform/`uname -m`/kernel/drv directories.

However, if you've purchased an unsupported device, the manufacturer should provide the software needed for the device to be properly installed, maintained, and administered.

At a minimum, this software includes a device driver and its associated configuration (.conf) file. The .conf files reside in the drv directories. In addition, the device might be incompatible with Solaris utilities, and might require custom maintenance and administrative utilities.

Contact your device manufacturer for more information.

Displaying Device Configuration Information

Three commands are used to display system and device configuration information:


Displays system configuration information, including total amount of memory and the device configuration as described by the system's device hierarchy. The output displayed by this command depends upon the type of system. 


Displays device configuration information including system hardware, pseudo devices, loadable modules, and selected kernel parameters.  


Displays system diagnostic messages as well as a list of devices attached to the system since the last reboot. 

See "Device Naming Conventions" for information on the device names used to identify devices on the system.

driver not attached Message

The following driver-related message might be displayed by the prtconf and sysdef commands:

device, instance #number (driver not attached)

This message does not always mean that a driver is unavailable for this device. It means that no driver is currently attached to the device instance because there is no device at this node or the device is not in use. Drivers are loaded automatically when the device is accessed and unloaded when the device is not in use.

Identifying a System's Devices

Use the output of prtconf and sysdef commands to identify which disk, tape, and CD-ROM devices are connected to the system. The output of these commands display the driver not attached messages next to the device instances. Since these devices are always being monitored by some system process, the driver not attached message is usually a good indication that there is no device at that device instance.

For example, the following prtconf output identifies a device at instance #3 and instance #6, which is probably a disk device at target 3 and a CD-ROM device at target 6 of the first SCSI host adapter (esp, instance #0).

$ /usr/sbin/prtconf
esp, instance #0
            sd (driver not attached)
            st (driver not attached)
            sd, instance #0 (driver not attached)
            sd, instance #1 (driver not attached)
            sd, instance #2 (driver not attached)
            sd, instance #3
            sd, instance #4 (driver not attached)
            sd, instance #5 (driver not attached)
            sd, instance #6

The same device information can be gleaned from the sysdef output.

How to Display System Configuration Information

Use the prtconf command to display system configuration information.

# /usr/sbin/prtconf

Use the sysdef command to display system configuration information including pseudo devices, loadable modules, and selected kernel parameters.

# /usr/sbin/sysdef

Examples--Displaying System Configuration Information

The following prtconf output is displayed on a SPARC based system.

# prtconf
System Configuration:  Sun Microsystems  sun4u
Memory size: 128 Megabytes
System Peripherals (Software Nodes):
    packages (driver not attached)
        terminal-emulator (driver not attached)
        deblocker (driver not attached)
        obp-tftp (driver not attached)
        disk-label (driver not attached)
        SUNW,builtin-drivers (driver not attached)
        sun-keyboard (driver not attached)
        ufs-file-system (driver not attached)
    chosen (driver not attached)
    openprom (driver not attached)
        client-services (driver not attached)
    options, instance #0
    aliases (driver not attached)
    memory (driver not attached)
    virtual-memory (driver not attached)
    pci, instance #0
        pci, instance #0
            ebus, instance #0
                auxio (driver not attached)
                power, instance #0
                SUNW,pll (driver not attached)
                se, instance #0
                su, instance #0
                su, instance #1
                ecpp (driver not attached)
                fdthree, instance #0

The following sysdef output is displayed from an IA based system.

# sysdef
* Hostid
* i86pc Configuration
* Devices
+boot (driver not attached)
memory (driver not attached)
aliases (driver not attached)
chosen (driver not attached)
i86pc-memory (driver not attached)
i86pc-mmu (driver not attached)
openprom (driver not attached)
options, instance #0
packages (driver not attached)
delayed-writes (driver not attached)
itu-props (driver not attached)
isa, instance #0
	motherboard (driver not attached)
	pnpADP,1542, instance #0
	asy, instance #0
	asy, instance #1
	lp, instance #0 (driver not attached)
	fdc, instance #0
		fd, instance #0
		fd, instance #1 (driver not attached)
	kd (driver not attached)
	kdmouse (driver not attached)

How to Display Device Information

Display device information with the dmesg command.

# /usr/sbin/dmesg

The dmesg output is displayed as messages on the system console and identifies which devices are connected to the system since the last reboot.

Examples--Displaying Device Information

The following dmesg output is displayed from a SPARC based system.

# dmesg
date starbug genunix: [ID 540533 kern.notice] SunOS Release 5.8 Generic 64-bit
date starbug genunix: [ID 223299 kern.notice] Copyright (c) 1983-2000 by S
un Microsystems, Inc.
date starbug genunix: [ID 678236] Ethernet address = 8:0:20:a6:d
date starbug genunix: [ID 897550] Using default device instance 
date starbug unix: [ID 389951] mem = 131072K (0x8000000)
date starbug unix: [ID 930857] avail mem = 121724928
date starbug rootnex: [ID 466748] root nexus = Sun Ultra 5/10 UP
A/PCI (UltraSPARC-IIi 333MHz)

The following dmesg output is displayed from an IA based system.

# dmesg
date naboo genunix: [ID 540533 kern.notice] SunOS Release 5.8 Version Generic 32-bit
date naboo genunix: [ID 223299 kern.notice] Copyright (c) 1983-2000 by Sun Microsystems, Inc.
date naboo genunix: [ID 897550] Using default device instance data
date naboo unix: [ID 168242] mem = 32380K (0x1f9f000)
date naboo unix: [ID 930857] avail mem = 19390464
date naboo rootnex: [ID 466748] root nexus = i86pc
date naboo rootnex: [ID 349649] pci0 at root: space 0 offset 0
date naboo genunix: [ID 936769] pci0 is /pci@0,0
date naboo genunix: [ID 678236] Ethernet address = 00:a0:24:89:b0:72
date naboo gld: [ID 944156] elx0: 3COM EtherLink III: 
type "ether" mac address 00:a0:24:89:b0:72
date naboo pci: [ID 370704] PCI-device: pci10b7,5950@c, elx0
date naboo genunix: [ID 936769] elx0 is /pci@0,0/pci10b7,5950@c