包含在尋找其他文件熱門支援資源 | 以 PDF 格式下載這本書 (1386 KB)
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-PluggingThe 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 TasksThe 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
About Device DriversA 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 DevicesThe 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
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 BenefitsThe 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 DevicesDevice 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 InformationThree commands are used to display system and device configuration information:
See "Device Naming Conventions" for information on the device names used to identify devices on the system. driver not attached MessageThe following driver-related message might be displayed by the prtconf and sysdef commands:
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 DevicesUse 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).
The same device information can be gleaned from the sysdef output. How to Display System Configuration InformationUse the prtconf command to display system configuration information.
Use the sysdef command to display system configuration information including pseudo devices, loadable modules, and selected kernel parameters.
Examples--Displaying System Configuration InformationThe following prtconf output is displayed on a SPARC based system.
The following sysdef output is displayed from an IA based system.
How to Display Device InformationDisplay device information with the dmesg command.
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 InformationThe following dmesg output is displayed from a SPARC based system.
The following dmesg output is displayed from an IA based system.
|
|||||||||||||||||||||||||||||||||