Physical Device Name

Before the operating system (OS) is loaded, the system locates a particular device through the full device pathname. Full device pathnames are described in Chapter 10, “OpenBoot.” 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, let’s view the full device pathname for a SCSI disk at target 0 by typing show-devs at the OpenBoot prompt. The full device pathname is displayed as follows:

/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd 

Now let’s look at the corresponding physical device name from the OS 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 disk 0:

iommu0 at root: obio 0xe0000000 
sbus0 at iommu0: obio 0xe0001000 
espdma0 at sbus0: SBus slot f 0x400000 
esp0:      esp-options=0x46 
esp0 at espdma0: SBus slot f 0x800000 sparc ipl 4 
sd0 at esp0: target 0 lun 0 
sd0 is iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/ 
esp@f,800000/sd@0,0 
    <SEAGATE-ST32550N-0014 cyl 3495 alt 2 hd 11 sec 109> 

Note

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


The physical device pathname for disk 0 is as follows:

/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@0,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 OS.

Physical device files are found in the /devices directory; therefore, the physical device file for SCSI disk 0 would be

/devices/iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@0,0:<#> 

where <#> is a letter representing the disk slice. The system commands used to provide information about physical devices are described in Table 11.1.

Table 11.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.

The following is an example of the output presented by the prtconf command:

#   prtconf 

Note

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


The system responds with:

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

SUNW,Ultra-5_10 
    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 

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

# sysdef 
* 
* Hostid 
* 
  80a26382 
* 
* sun4u Configuration 
* 
* 
* Devices 
* 
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 

* System Configuration 
* 
  swap files 
swapfile             dev  swaplo blocks   free 
/dev/dsk/c0t0d0s1   136,1      16 1048928 1023008 
* 
* Tunable Parameters 
* 
 2482176   maximum memory allowed in buffer cache (bufhwm) 
    1898   maximum number of processes (v.v_proc) 
      99   maximum global priority in sys class (MAXCLSYSPRI) 
    1893   maximum processes per user id (v.v_maxup) 
      30   auto update time limit in seconds (NAUTOUP) 
      25   page stealing low water mark (GPGSLO) 
       5   fsflush run rate (FSFLUSHR) 
      25   minimum resident memory for avoiding deadlock (MINARMEM) 
      25        minimum swapable memory for avoiding deadlock (MINASMEM) 
* 
* Utsname Tunables 
* 
     5.9  release (REL) 
 ultra5  node name (NODE) 
   SunOS  system name (SYS) 
Beta_Refresh  version (VER) 
* 
* Process Resource Limit Tunables (Current:Maximum) 
* 
          Infinity:Infinity             cpu time 
          Infinity:Infinity             file size 
          Infinity:Infinity             heap size 
0x0000000000800000:Infinity             stack size 
          Infinity:Infinity             core file size 
0x0000000000000100:0x0000000000000400   file descriptors  
          Infinity:Infinity             mapped memory 
* 
* 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 
* 
   1048576      max shared memory segment size (SHMMAX) 
     1  min shared memory segment size (SHMMIN) 

*Output has been truncated.

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

# dmesg 

Aug  1 12:08:04 ultra5 genunix: [ID 540533 kern.notice] SunOS Release 5.9 
Version Generic_108528-07 64-bit 
Aug  1 12:08:04 ultra5 genunix: [ID 913631 kern.notice] Copyright 1983-2001 
Sun Microsystems, Inc.  All rights reserved. 
Aug  1 12:08:04 ultra5 genunix: [ID 678236 kern.info] Ethernet address = 
8:0:20:a2:63:82 
Aug  1 12:08:04 ultra5 unix: [ID 389951 kern.info] mem = 131072K (0x8000000) 
Aug  1 12:08:04 ultra5 unix: [ID 930857 kern.info] avail mem = 122142720 
Aug  1 12:08:04 ultra5 rootnex: [ID 466748 kern.info] root nexus = 
Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 270MHz) 
Aug  1 12:08:04 ultra5 rootnex: [ID 349649 kern.info] pcipsy0 at root: 
UPA 0x1f 0x0 
Aug  1 12:08:04 ultra5 genunix: [ID 936769 kern.info] pcipsy0 is /pci@1f,0 
Aug  1 12:08:04 ultra5 pcipsy: [ID 370704 kern.info] PCI-device: 
pci@1,1, simba0 
Aug  1 12:08:04 ultra5 genunix: [ID 936769 kern.info] simba0 is 
/pci@1f,0/pci@1,1 
Aug  1 12:08:04 ultra5 pcipsy: [ID 370704 kern.info] PCI-device: pci@1, simba1 
Aug  1 12:08:04 ultra5 genunix: [ID 936769 kern.info] simba1 is /pci@1f,0/pci@1 
Aug  1 12:08:20 ultra5 simba: [ID 370704 kern.info] PCI-device: ide@3, uata0 

*Output has been truncated.

Use the output of the prtconf and sysdef commands to identify which disk, tape, and CD-ROM devices are connected to the system. As shown in the preceding examples, 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 OS 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 10, the system administrator can customize the way in which kernel modules are loaded by modifying the /etc/system file.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset