| 命令 | 说明 | 手册页 | 
|---|---|---|
| prtconf | 显示系统配置信息,包括系统设备分层结构描述的内存总量和设备配置。通过此命令显示的输出取决于系统的类型。 | |
| sysdef | 显示设备配置信息,包括系统硬件、伪设备、可装入模块以及选定的内核参数。 | |
| dmesg | 显示系统诊断消息以及从上次系统重新引导以来与系统连接的设备的列表。 | 
有关用于标识系统上设备的设备名称的信息,请参见设备命名约定。
prtconf 和 sysdef 命令可能会显示以下与驱动程序有关的消息:
| device, instance #number (driver not attached) | 
此消息并不总是表示驱动程序不可用于此设备。此消息表示当前没有向设备实例附加任何驱动程序,因为此节点中不存在任何设备或者设备未在使用中。驱动程序是在访问设备时自动装入的。如果设备未在使用中,则会取消挂载这些驱动程序。
 如何显示系统配置信息
如何显示系统配置信息使用 prtconf 和 sysdef 命令的输出可确定与系统连接的磁盘、磁带和 CD-ROM 设备。这些命令的输出会在设备实例旁边显示 driver not attached 消息。由于这些设备始终受某个系统进程监视,因此 driver not attached 消息通常明确表示该设备实例中不存在任何设备。
使用 sysdef 命令可显示系统配置信息,其中包括伪设备、可装入模块以及选定的内核参数。
显示系统和设备的配置信息。
显示与系统连接的所有设备。
例如,SunBlade 1000 上的以下 prtconf -v 输出确定了与系统连接的磁盘设备。详细的磁盘信息在 ssd/fp 驱动程序部分中的 Device Minor Nodes 一节介绍。
| $ /usr/sbin/prtconf -v | more
.
.
.
            Device Minor Nodes:
               dev=(118,8)
                  dev_path=/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w210000
2037bde864,0:a
                      spectype=blk type=minor
                      dev_link=/dev/dsk/c0t1d0s0
                  dev_path=/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w210000
2037bde864,0:a,raw
                      spectype=chr type=minor
                      dev_link=/dev/rdsk/c0t1d0s0
               dev=(118,9)
                  dev_path=/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w210000
2037bde864,0:b
                      spectype=blk type=minor
                      dev_link=/dev/dsk/c0t1d0s1
                  dev_path=/pci@8,600000/SUNW,qlc@4/fp@0,0/ssd@w210000
2037bde864,0:b,raw
.
.
. | 
显示有关与系统连接的某个特定设备的信息。
例如,SunBlade 1000 上的以下 prtconf 输出显示了 /dev/dsk/c0t1d0s0 的 ssd 实例编号。
| # prtconf -v /dev/dsk/c0t1d0s0 ssd, instance #1 | 
仅显示与系统连接的设备。
| # prtconf | grep -v not | 
显示设备使用信息。
例如,以下 fuser 命令显示了正在访问 /dev/console 设备的进程。
| # fuser -d /dev/console /dev/console: 346o 323o # | 
基于 SPARC 的系统中会显示以下 prtconf 输出。
| # prtconf
System Configuration:  Sun Microsystems  sun4u
Memory size: 512 Megabytes
System Peripherals (Software Nodes):
SUNW,Sun-Blade-1000
    scsi_vhci, instance #0
    packages (driver not attached)
        SUNW,builtin-drivers (driver not attached)
        deblocker (driver not attached)
        disk-label (driver not attached)
        terminal-emulator (driver not attached)
        obp-tftp (driver not attached)
        dropins (driver not attached)
        kbd-translator (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)
    SUNW,UltraSPARC-III, instance #0
    memory-controller, instance #0
    SUNW,UltraSPARC-III, instance #1
    memory-controller, instance #1
    pci, instance #0
        ebus, instance #0
            flashprom (driver not attached)
            bbc (driver not attached)
            ppm, instance #0
            i2c, instance #0
                dimm-fru, instance #0
                dimm-fru, instance #1
                dimm-fru, instance #2
                dimm-fru, instance #3
                nvram, instance #4
                idprom (driver not attached)
            i2c, instance #1
                cpu-fru, instance #5
                temperature, instance #0
                cpu-fru, instance #6
                temperature, instance #1
                fan-control, instance #0
                motherboard-fru, instance #7
                i2c-bridge (driver not attached)
            beep, instance #0
            rtc, instance #0
            gpio (driver not attached)
            pmc (driver not attached)
            floppy (driver not attached)
            parallel (driver not attached)
            serial, instance #0
        network, instance #0
        firewire, instance #0
        usb, instance #0
        scsi (driver not attached)
            disk (driver not attached)
            tape (driver not attached)
        scsi (driver not attached)
            disk (driver not attached)
            tape (driver not attached)
    pci, instance #1
        SUNW,qlc, instance #0
            fp (driver not attached)
                disk (driver not attached)
            fp, instance #1
                ssd, instance #1
                ssd, instance #0 (driver not attached)
                ssd, instance #2 (driver not attached)
                ssd, instance #3 (driver not attached)
                ssd, instance #4 (driver not attached)
                ssd, instance #5 (driver not attached)
                ssd, instance #6 (driver not attached)
    upa, instance #0
        SUNW,ffb, instance #0 (driver not attached)
    ppm, instance #0
    pseudo, instance #0 | 
| # sysdef * Hostid * 29f10b4d * * 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) . . . |