使用ioscan 查看设备地址
时间:2010-10-09 来源:todayboy
ioscan #short listing of all devices
ioscan -f #full listing of all devices
ioscan -fu #full listing ,using cached information
ioscan -fH 8/12.2.0 #full listing device at 8/12.2.0
ioscan -fC disk #full listing of "disk" class devices
# ioscan -f
Class I H/W Path Driver S/W State H/W Type Description
==============================================================================
root 0 root CLAIMED BUS_NEXUS
ioa 0 0 sba CLAIMED BUS_NEXUS System Bus Adapter (1229)
ba 0 0/0 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
OO 0 0/0/1/0 UsbOhci CLAIMED INTERFACE USB OHCI Interface
OO 1 0/0/1/1 UsbOhci CLAIMED INTERFACE USB OHCI Interface
OO 2 0/0/1/2 UsbEhci CLAIMED INTERFACE USB EHCI Interface
sideba 0 0/0/2/0 side_multi CLAIMED INTERFACE CMD IDE controller
ioscan 常用方法:
1. ioscan 扫描硬件并列出所有设备和发现的其他设备。显示每个组件的硬件地址。类弄和简单描过。
2. ioscan -f 象前都那样扫描系统硬件,但示示完整的列表。
3. ioscan -fH 8/12.2.0 显示在批定硬件地址上设备的完整列表。在大弄系统中如想查看单个设备的信息,就用这个命令
4. ioscan -fC disk 显示批定类型的设备。另两种比较常见的类弄是"tape"和"lan".
5. ioscan -fn 显示与设备相关的设备文件名。
ioscan 输出的字段:
1.CLASS 设备的分类,定义在/usr/conf/master.d的文件中
2.instance 与设备或板卡有关的实例号,它是一个分配板卡或设备的数字,在同类设备中该数字保持唯一。
3.H/W Path 一个硬件组件的数字串,顺序记录了总线到 设备的地址。
4. Driver 控制硬件组件的驱动程序名称贷,如果没有控制硬件组件的驱动,一个问号会显示在输出中。
5. S/W stae 软件绑定的结果。Claimed 表示设备的驱动程序被成功地绑定在设备上。Unclaimed 表示在内核中没有这个设备的驱动。
6. Hardware type 硬件组件的实体标识符。
7. Description 设备的描述。
用ioscan -f 进行故障检查:
在系统中添加接口卡或SCSI设备后,你应该执行ioscan,看看系统是不是识别了这个设备。
# ioscan -f
Class I H/W Path Driver S/W State H/W Type Description
==============================================================================
root 0 root CLAIMED BUS_NEXUS
ioa 0 0 sba CLAIMED BUS_NEXUS System Bus Adapter (1229)
ba 0 0/0 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
OO 0 0/0/1/0 UsbOhci CLAIMED INTERFACE USB OHCI Interface
OO 1 0/0/1/1 UsbOhci CLAIMED INTERFACE USB OHCI Interface
OO 2 0/0/1/2 UsbEhci CLAIMED INTERFACE USB EHCI Interface
sideba 0 0/0/2/0 side_multi CLAIMED INTERFACE CMD IDE controller
ext_bus 0 0/0/2/0.0 side CLAIMED INTERFACE IDE Primary Channel
target 0 0/0/2/0.0.0 tgt CLAIMED DEVICE
disk 0 0/0/2/0.0.0.0 sdisk CLAIMED DEVICE TEAC DV-28E-N
target 1 0/0/2/0.0.7 tgt CLAIMED DEVICE
ctl 0 0/0/2/0.0.7.0 sctl CLAIMED DEVICE Initiator
ext_bus 1 0/0/2/0.1 side CLAIMED INTERFACE IDE Secondary Channel
target 2 0/0/2/0.1.7 tgt CLAIMED DEVICE
ctl 1 0/0/2/0.1.7.0 sctl CLAIMED DEVICE Initiator
ba 1 0/1 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ext_bus 2 0/1/1/0 mpt CLAIMED INTERFACE SCSI Ultra320
target 3 0/1/1/0.0 tgt CLAIMED DEVICE
disk 1 0/1/1/0.0.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
target 4 0/1/1/0.1 tgt CLAIMED DEVICE
disk 2 0/1/1/0.1.0 sdisk CLAIMED DEVICE HP 73.4GST373454LC
target 5 0/1/1/0.7 tgt CLAIMED DEVICE
ctl 2 0/1/1/0.7.0 sctl CLAIMED DEVICE Initiator
ext_bus 3 0/1/1/1 mpt CLAIMED INTERFACE SCSI Ultra320
target 6 0/1/1/1.7 tgt CLAIMED DEVICE
ctl 3 0/1/1/1.7.0 sctl CLAIMED DEVICE Initiator
lan 0 0/1/2/0 iether CLAIMED INTERFACE HP PCI-X 1000Base-T Dual-port Built-in
lan 1 0/1/2/1 iether CLAIMED INTERFACE HP PCI-X 1000Base-T Dual-port Built-in
ba 2 0/2 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ba 3 0/3 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ba 4 0/4 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ba 5 0/5 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
ba 6 0/6 lba CLAIMED BUS_NEXUS Local PCI-X Bus Adapter (122e)
tty 0 0/6/1/0 asio0 CLAIMED INTERFACE PCI SimpleComm (103c1290)
tty 1 0/6/1/1 asio0 CLAIMED INTERFACE PCI Serial (103c1048)
graphics 0 0/6/2/0 gvid_core CLAIMED INTERFACE PCI Display (10025159)
processor 0 120 processor CLAIMED PROCESSOR Processor
Listing Device File with ioscan
ioscan -fun #list all devices and device file
ioscan -funC disk #list all diskdevices and device files
ioscan -funC tape #list all tape drives and device files
注释:
ioscan -fun 命令提供了一个方便的机制来判断设备文件与系统上哪一个硬件地址相连。
用lssf 列出设备文件:
Syntax:
/usr/sbin/lssf path [path ...]
Examples:
# lssf /dev/rdsk/c2t1d0s3
sdisk card instance 2 SCSI target 1 SCSI LUN 0 section 3 at address 0/1/1/0.1.0 /dev/rdsk/c2t1d0s3
/dev 目录介绍:
在大多数hp-ux系统上,所有设备文件存在/dev目录中,一些设备文件直接在/dev下,面另一引动分娄存入在/dev下的子目录里:
1. /dev 包含所有终端、调制解调器、网络和打印机设备文件。
2. /dev/dsk 包含所有块硬盘设备文件
3. /dev/rdsk 包含所有字符硬盘设备文件。
4. /dev/rmt 包含所有磁带设备文件。