Previous Page
Next Page

Physical Device Name

Before the operating system is loaded, the system locates a particular device through the device tree, also called the full device pathname. Full device pathnames are described in Chapter 3, "Perform System Boot and Shutdown Procedures." After the kernel is loaded, however, a device is located by its physical device pathname. Physical device names represent the full device pathname for a device. Note that the two names have the same structure. For example, the full device pathname for a SCSI disk at target 0 on a Sun Ultra 450 system is as follows:

/pci@1f,4000/scsi@3/disk@0,0

Now let's look at the corresponding physical device name from the operating system level. Use the dmesg command, described later in this section, to obtain information about devices connected to your system. By typing dmesg at the command prompt, you'll receive the following information about SCSI disks 3 and 4:

Jul 25 14:06:47 smokey genunix: [ID 936769 kern.notice] sd19 is\
 /pci@1f,0/pci@1/scsi@1,1/sd@3,0
Jul 25 14:06:48 smokey scsi: [ID 193665 kern.notice] sd20 at\
 glm1: target 4 lun 0
Jul 25 14:06:48 smokey genunix: [ID 936769 kern.notice] sd20 is\
 /pci@1f,0/pci@1/scsi@1,1/sd@4,0

This same information is also available in the /var/adm/messages file.

The physical device pathnames for disks 3 and 4 are as follows:

Jul 25 14:06:47 smokey scsi: [ID 193665 kern.notice] sd19 at glm1: target 3 lun 0
Jul 25 14:06:47 smokey genunix: [ID 936769 kern.notice] sd19 is\
/pci@1f,0/pci@1/scsi@1,1/sd@3,0
Jul 25 14:06:48 smokey scsi: [ID 193665 kern.notice] sd20 at glm1: target 4 lun 0
Jul 25 14:06:48 smokey genunix: [ID 936769 kern.notice] sd20 is\
/pci@1f,0/pci@1/scsi@1,1/sd@4,0

As you can see, the physical device name and the full device name are the same. The difference is that the full device pathname is simply a path to a particular device. The physical device is the actual driver used by Solaris to access that device from the operating system.

Physical device files are found in the /devices directory. The content of the /devices directory is controlled by the devfs file system. The entries in the /devices directory dynamically represent the current state of accessible devices in the kernel and require no administration. New device entries are added when the devices are detected and added to the kernel. The physical device files for SCSI disks 3 and 4 would be

/devices/pci@1f,0/pci@1/scsi@1,1/sd@3,0:<#>
/devices/pci@1f,0/pci@1/scsi@1,1/sd@4,0:<#>

for the block device and

/devices/pci@1f,0/pci@1/scsi@1,1/sd@3,0:<#>,raw
/devices/pci@1f,0/pci@1/scsi@1,1/sd@4,0:<#>,raw

for the character (raw) device, where <#> is a letter representing the disk slice. Block and character devices are described later in this chapter in the section titled "Block and Raw Devices."

The system commands used to provide information about physical devices are described in Table 1.1.

Table 1.1. Device Information Commands

Command

Description

prtconf

Displays system configuration information, including the total amount of memory and the device configuration, as described by the system's hierarchy. This useful tool verifies whether a device has been seen by the system.

sysdef

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

dmesg

Displays system diagnostic messages as well as a list of devices attached to the system since the most recent restart.

format

The format command displays both physical and logical device names for all available disks.


Note

prtconf Output The output produced by the prtconf command can vary depending on the version of the system's PROM.


Type the prtconf command:

prtconf

The following output is displayed:

System Configuration:  Sun Microsystems  sun4u
Memory size: 128 Megabytes
System Peripherals (Software Nodes):

SUNW,Ultra-5_10
    scsi_vhci, instance #0
    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
                eeprom (driver not attached)
                flashprom (driver not attached)
                SUNW,CS4231, instance #0
            network, instance #0
            SUNW,m64B, instance #0
            ide, instance #0
                disk (driver not attached)
                cdrom (driver not attached)
                sd, instance #3
                dad, instance #1
        pci, instance #1
        scsi, instance #0 (driver not attached)
            disk (driver not attached)
            tape (driver not attached)
        scsi, instance #1
            disk (driver not attached)
            tape (driver not attached)
            sd, instance #0 (driver not attached)

*Output has been truncated.

Use the -v option to display detailed information about devices such as information about the attached SCSI disks:

dev_path=/pci@1f,0/pci@1/scsi@1,1/sd@2,0:a
            spectype=blk type=minor
            dev_link=/dev/dsk/c2t2d0s0
            dev_link=/dev/sd18a
dev_path=/pci@1f,0/pci@1/scsi@1,1/sd@2,0:a,raw
             spectype=chr type=minor
             dev_link=/dev/rdsk/c2t2d0s0
             dev_link=/dev/rsd18a

Next is an example of the output displayed by the sysdef command. Type the sysdef command:

sysdef

The following output is displayed:

* Hostid
*
  80a26382
*
* sun4u Configuration
*
*
* Devices
*
scsi_vhci, instance #0
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
                        eeprom (driver not attached)
                        flashprom (driver not attached)
                        SUNW,CS4231, instance #0 (driver not attached)
                network, instance #0
                SUNW,m64B, instance #0 (driver not attached)
                ide, instance #0
                        disk (driver not attached)
                        cdrom (driver not attached)
                        sd, instance #1
                        dad, instance #1

*Output has been truncated.

* System Configuration
*
  swap files
swapfile            dev  swaplo blocks   free
/dev/dsk/c0t0d0s3  136,11     16 1052624 1052624
*
* Tunable Parameters
*
 2498560        maximum memory allowed in buffer cache (bufhwm)
    1914        maximum number of processes (v.v_proc)
      99        maximum global priority in sys class (MAXCLSYSPRI)
    1909        maximum processes per user id (v.v_maxup)
      30        auto update time limit in seconds (NAUTOUP)
      25        page stealing low water mark (GPGSLO)
       1        fsflush run rate (FSFLUSHR)
      25        minimum resident memory for avoiding deadlock (MINARMEM)
      25        minimum swapable memory for avoiding deadlock (MINASMEM)
*
* Utsname Tunables
*
    5.10  release (REL)
  ultra5  node name (NODE)
   SunOS  system name (SYS)
 Generic  version (VER)
*
* Process Resource Limit Tunables (Current:Maximum)
*
0x0000000000000100:0x0000000000010000   file descriptors
*
* Streams Tunables
*
     9  maximum number of pushes allowed (NSTRPUSH)
 65536  maximum stream message size (STRMSGSZ)
  1024  max size of ctl part of message (STRCTLSZ)
*
* IPC Messages module is not loaded
*
*
* IPC Semaphores module is not loaded
*
*
* IPC Shared Memory module is not loaded
*
*
* Time Sharing Scheduler Tunables
*
60      maximum time sharing user priority (TSMAXUPRI)
SYS     system class name (SYS_NAME)

*Output has been truncated.

Finally, here's an example of the device information for an Ultra system displayed using the dmesg command:

dmesg

The following output is displayed:

Aug 5 11:19:16 smokey reboot: [ID 662345 auth.crit] rebooted by root
Aug 5 11:19:22 smokey genunix: [ID 672855 kern.notice] syncing file systems...
Aug 5 11:19:22 smokey genunix: [ID 904073 kern.notice]  done
Aug 5 11:20:40 smokey genunix: [ID 540533 kern.notice]
SunOS Release 5.10 Version Generic 64-bit
Aug 5 11:20:40 smokey genunix: [ID 943906 kern.notice] Copyright 1983-2005\
 Sun Microsystems, Inc.  All rights reserved.
Aug 5 11:20:40 smokey Use is subject to license terms.
Aug 5 11:20:40 smokey genunix:[ID 678236 kern.info] Ethernet address= 8:0:20:c0:3f:29
Aug 5 11:20:40 smokey unix: [ID 673563 kern.info] NOTICE: Kernel Cage is ENABLED
Aug 5 11:20:40 smokey unix: [ID 389951 kern.info] mem = 131072K (0x8000000)
Aug 5 11:20:40 smokey unix: [ID 930857 kern.info] avail mem = 121143296
Aug 5 11:20:40 smokey rootnex: [ID 466748 kern.info] root nexus = \
 Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 333MHz)
Aug 5 11:20:40 smokey rootnex: [ID 349649 kern.info] pseudo0 at root
Aug 5 11:20:40 smokey genunix: [ID 936769 kern.info] pseudo0 is /pseudo
Aug 5 11:20:40 smokey rootnex: [ID 349649 kern.info] scsi_vhci0 at root
Aug 5 11:20:40 smokey genunix: [ID 936769 kern.info] scsi_vhci0 is /scsi_vhci
Aug 5 11:20:40 smokey rootnex: [ID 349649 kern.info] pcipsy0 at root: UPA 0x1f 0x0
Aug 5 11:20:40 smokey genunix: [ID 936769 kern.info] pcipsy0 is /pci@1f,0
Aug 5 11:20:40 smokey pcipsy: [ID 370704 kern.info] PCI-device: pci@1,1, simba0
Aug 5 11:20:40 smokey genunix: [ID 936769 kern.info] simba0 is /pci@1f,0/pci@1,1
Aug 5 11:20:40 smokey simba: [ID 370704 kern.info] PCI-device: ide@3, uata0
Aug 5 11:20:40 smokey genunix: [ID 936769 kern.info] uata0 is /pci@1f,0/pci@1,1/ide@3
Aug 5 11:20:41 smokey uata: [ID 114370 kern.info] dad1 at uata0
Aug 5 11:20:41 smokey uata: [ID 347839 kern.info]  target 0 lun 0
Aug 5 11:20:41 smokey genunix: [ID 936769 kern.info] dad1 is\
 /pci@1f,0/pci@1,1/ide@3/dad@0,0
Aug 5 11:20:41 smokey dada: [ID 365881 kern.info]\
     <IBM-DJNA-370910 cyl 17660 alt 2 hd 16 sec 63>
Aug 5 11:20:41 smokey swapgeneric: [ID 308332 kern.info] root on\
 /pci@1f,0/pci@1,1/ide@3/disk@0,0:a fstype ufs

*Output has been truncated.

Use the output of the prtconf command to identify which disk, tape, and CD-ROM devices are connected to the system. As shown in the preceding prtconf and sysdef example, some devices display the driver not attached message next to the device instance. 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. The operating system automatically loads drivers when the device is accessed, and it unloads them when it is not in use.

The system determines what devices are attached to it at startup. This is why it is important to have all peripherals powered on at startup, even if they are not currently being used. During startup, the kernel configures itself dynamically, loading needed modules into memory. 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 if needed. As described in Chapter 3, the system administrator can customize the way in which kernel modules are loaded by modifying the /etc/system file.


Previous Page
Next Page