(lsscsi & lsblk)=HCTL


(lsscsi & lsblk)=HCTL

在linux中,scsi有4个层级的寻址方案:

  • SCSI adapter number [host]
  • channel number [bus]
  • id number [target]
  • lun [lun]



 

[root@laptop ~]$ lsblk --scsi
NAME HCTL       TYPE VENDOR   MODEL             REV TRAN
sda  0:0:0:0    disk VMware,  VMware Virtual S 1.0  spi
sr0  2:0:0:0    rom  NECVMWar VMware IDE CDR10 1.00 ata
#lsblk -S
NAME HCTL       TYPE VENDOR   MODEL             REV TRAN
sdd  2:0:0:0    disk ATA      ST2000DM008-2FR1 0001 sata
sdb  0:0:0:0    disk ATA      M4-CT128M4SSD1   000F sata
sr0  5:0:0:0    rom  ASUS     DRW-24D3ST       1.01 sata
sde  4:0:0:0    disk ATA      WDC WD20EZRX-00D 0A80 sata
sdc  1:0:0:0    disk ATA      INTEL SSDSC2KW51 002C sata

执行lsscsi可以看到如下显示结果

[0:0:0:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sda 
[0:0:1:0]    disk    VMware,  VMware Virtual S 1.0   /dev/sdb 
[2:0:0:0]    cd/dvd  NECVMWar VMware IDE CDR10 1.00  /dev/sr0 

前面的[0:0:1:0]四个数字就代表了这个scsi设备的hctl参数,分别是:

host: SCSI hosts currently attached to the system.调用lsscsi -H可以看到所有host
channel
target:
lun: 逻辑单元数


Read More

lspci, lsscsi, lsusb, lsblk 获取设备信息


lspci List PCI Bus Devices PCI设备
lsscsi List scsi Devices SCSI设备
lsusb List USB buses and device USB设备
lsblk List block devices 块设备
lscpu List CPU Details CPU信息

 


Read More

lspci命令返回格式解析BDF


 

Let's take the first line of the output:

00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)

The output above contains the following sections:

  • 00:00.0 - The bus number, device number, and function number, in that order.
  • Host bridge:  - Device class.
  • Intel Corporation - Device vendor.
  • 440FX - 82441FX PMC - Device name.
  • [Natoma] - Mode of operation.
  • (rev 02) - Revision number.

Read More

setpci控制nvme点灯setpci读取点灯状态


使用以下命令,进行控制nvme点灯

Set1:readlink –f /sys/block/nvme0n1 |awk –F “/” ‘{print $5} ‘|sed  ‘s/000://g’
            This command will return the PCIE BUS function of the NVME0n1------ 85:00.0
Set2:setpci –s 85:00.0 A9.B=19      Turn on the Locate LED
             setpci –s 85:00.0 A9.B=18      Turn off the Locate LED
             setpci –s 85:00.0 A8.B=78      Turn on the Error LED
             setpci –s 85:00.0 A8.B=F8      Turn off the Error LED
             setpci –s 85:00.0 A8.W=1978      Turn on the Rebuild LED
             setpci –s 85:00.0 A8.W=18F8      Turn off the Rebuild LED

 

如果读取单个寄存器的话,有一个简单的方法。

仍然是是属于setpci命令,但后面不加=,会显示当前寄存器的值。

其中A9 A8为地址,B表示一个字节,W表示两个字节。

 

setpci –s 85:00.0 A9.B

setpci –s 85:00.0 A8.B

setpci –s 85:00.0 A8.W

 

另外可以使用lspci查看,操作示例如下

 

root@laptop:~# lspci -s 00:1f.3 -vvvxxx

00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)

         Subsystem: Pegatron Device 2200

         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

         Interrupt: pin C routed to IRQ 11

         Region 0: Memory at b0719000 (64-bit, non-prefetchable) [size=256]

         Region 4: I/O ports at 5040 [size=32]

00: 86 80 22 8c 03 00 80 02 05 00 05 0c 00 00 00 00

10: 04 90 71 b0 00 00 00 00 00 00 00 00 00 00 00 00

20: 41 50 00 00 00 00 00 00 00 00 00 00 0a 1b 00 22

30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 03 00 00

40: 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

60: 03 04 04 00 00 00 08 08 00 00 00 00 00 00 00 00

70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

80: 05 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

f0: 00 00 00 00 00 00 00 00 b1 0f 06 08 00 00 00 00

 

root@laptop:~#  setpci -s 00:1f.3 80.b=04

root@laptop:~# lspci -s 00:1f.3 -vvvxxx

00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05)

         Subsystem: Pegatron Device 2200

         Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

         Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

         Interrupt: pin C routed to IRQ 11

         Region 0: Memory at b0719000 (64-bit, non-prefetchable) [size=256]

         Region 4: I/O ports at 5040 [size=32]

00: 86 80 22 8c 03 00 80 02 05 00 05 0c 00 00 00 00

10: 04 90 71 b0 00 00 00 00 00 00 00 00 00 00 00 00

20: 41 50 00 00 00 00 00 00 00 00 00 00 0a 1b 00 22

30: 00 00 00 00 00 00 00 00 00 00 00 00 0b 03 00 00

40: 11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

60: 03 04 04 00 00 00 08 08 00 00 00 00 00 00 00 00

70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

80: 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

f0: 00 00 00 00 00 00 00 00 b1 0f 06 08 00 00 00 00


Read More

lspci命令解释及常用命令


 

lspci命令用于显示当前主机的所有PCI总线信息,以及所有已连接的PCI设备信息。

 

-n:以数字方式显示PCI厂商和设备代码;
-t:以树状结构显示PCI设备的层次关系,包括所有的总线、桥、设备以及它们之间的联接;
-b:以总线为中心的视图;
-d:仅显示给定厂商和设备的信息;
-s:仅显示指定总线、插槽上的设备和设备上的功能块信息;
-i:指定PCI编号列表文件,而不使用默认的文件;
-m:以机器可读方式显示PCI设备信息。

 

lspci -tv 输出 pci 结构简略树状图。
lspci -xxx 输出 16 进制形式显示的 pci 配置空间 dump 数据。
lspci -vvv 此命令显示详细的 pci 信息,这些信息都是通过读取 pci 设备在 /sys 目录下的 config 配置完成的

 

显示单个BDF的pci信息

# lspci -s ff:13.1
ff:13.1 System peripheral: Intel Corporation Broadwell Memory Controller 0 - Target Address/Thermal/RAS (rev 03)
# lspci -mm -s ff:13.1
ff:13.1 "System peripheral" "Intel Corporation" "Broadwell Memory Controller 0 - Target Address/Thermal/RAS" -r03 "Intel Corporation" "Broadwell Memory Controller 0 - Target Address/Thermal/RAS"

 


Read More

setpci命令解释及常用命令


setpci命令是一个查询和配置PCI设备的使用工具。

语法

setpci(选项)(参数)

选项

-v:显示指令执行的细节信息;
-f:当没有任何操作需要完成时,不显示任何信息;
-D:测试模式,并不真正将配置信息写入寄存器;
-d:仅显示给定厂商和设备的信息;
-s:仅显示指定总线、插槽上的设备或设备上的功能块信息。

Linux下调节笔记本屏幕亮度方法:

首先进入终端输入lspci命令,列出各种设备的地址:
 

#lspci
00:00.0 host bridge: Intel Corporation Mobile 945GM/PM/GMS, 943/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation N10/ICH 7 Family PCI Express Port 2 (rev 02)

发现00:02.0是VGA设备,于是我们修改它的属性:

sudo setpci -s 00:02.0 F4.B=FF

 

解释一下:

setpci 是修改设备属性的命令。
-s 表示接下来输入的是设备的地址。
00:02.0 VGA设备地址(<总线>:<接口>.<功能>)。
F4 要修改的属性的地址,这里应该表示“亮度”。
.B 修改的长度(B应该是字节(Byte),还有w(应该是Word,两个字节)、L(应该是Long,4个字节))。
=FF 要修改的值(可以改)。

我这里00是最暗,FF是最亮,不同的电脑可能不一样。比如说我嫌FF太闪眼了,我就可以:

sudo setpci -s 00:02.0 F4.B=CC


Read More


RJ45网口两个LED灯的指示意义以及控制原理


一般RJ45网口会有两个LED灯,至少从外观上看是两个。一个是link灯,一个是ACT灯。

参考下图所示,缺口朝上,一般右边绿灯常亮,表示link上,左边黄色、橘色、或者绿色灯闪烁,表示有数据传输。

有些act灯实际可能有多个是个多色灯,比如黄色、绿色。当100M时闪绿灯,当千兆时闪黄灯,以做区分。

 

这些灯是有PHY进行控制的。PHY的硬件接口文档中会有说明,以及相关的寄存器设置。

在uboot中可以使用mii来修改寄存器,改变亮灯状态。

在linux系统下,可以使用内核、驱动或者mii-tools修改控制灯的状态。

这些如何操作需要参考具体的硬件手册,因硬件手册厂家一般是不公开的,但从网上也能够找到零星的资料。

以下能够查找到的网上公开资料,可供参考

RTL8211F在uboot下使用mii工具配置网口灯详解

RJ45 LED灯


Read More

LSI 3008的IT与IR模式的区别


本文综合baidu与bing返回结果。

https://www.supermicro.org.cn/support/faqs/faq.cfm?faq=16169

Question:
For LSI Host Bus Adapter (HBA) firmware, what is the difference between IT mode and IR mode?
对于LSI主机总线适配器(HBA)固件,IT模式与IR模式有何区别?

Answer:
The two firmware types are Initiator Target (IT) and Integrated RAID (IR). IR is the typical hardware RAID firmware that the internal cards or boards ship with.
The IT firmware, on the other hand, is the Initiator Target firmware which is designed to allow a SAS HBA to connect to up to 256 devices using SAS Expanders. The IT firmware is typically shipped on external cards. The IT firmware does not have any RAID capabilities and simply acts as an HBA.

这两种固件类型是启动器目标(IT)和集成RAID(IR)。
IR是内部卡或板附带的典型硬件RAID固件。
IT固件允许SAS HBA使用SAS扩展器连接到多达256个设备。IT固件通常在外部卡上提供。IT固件没有任何RAID功能,只是充当HBA。

 

LSI SAS3008是常用的RAID卡种类。此RIAD卡有两种固件:IT和IR。
当固件是3008IT时,只能直连硬盘而不能配置RAID。
当固件是3008IR时,可以配置RAID。

Basicly the IT firmware is only just a HBA and the boot up time is quick. The IR firmware is the raid software firmware so boot up is a bit longer than having the IT firmware only. You can cross flash with the LSI firmware in IT mode only or IT and IR mode which is default in LSI. If you are going with pure software raid then the IT firmware is best. 

更多解释:

LSI-RAID卡命名后缀的含义(it-ir-imr-mr)(华为)

broadcom官方MR、iMR、IR和IT软件功能比较矩阵


Read More

ipmitool命令与raw命令与ipmi spec对照表2-NETFN_SENSOR


ipmitool命令与raw命令与ipmi spec对照表2-NETFN_SENSOR

raw命令索引 对应IPMI Spec的章节 raw命令格式 字符串命令
ipmitool raw 0x04 0x00 Set Event Receiver(29.1) ipmitool raw 0x04 0x00 Data[1:2]  
ipmitool raw 0x04 0x01 Get Event Receiver(29.2) ipmitool raw 0x04 0x01  
ipmitool raw 0x04 0x02 Platform Event(29.3) ipmitool raw 0x04 0x02 Data[1:7] ipmitool event [event_dir]
ipmitool event 1
ipmitool event 2
ipmitool event 3
ipmitool raw 0x04 0x10 Get PEF Capabilities(30.1) ipmitool raw 0x04 0x10 ipmitool pef
ipmitool pef info
ipmitool raw 0x04 0x11 Arm PEF Postpone Timer(30.2) ipmitool raw 0x04 0x11 Data[1]  
ipmitool raw 0x04 0x12 Set PEF Configuration Parameters(30.3) ipmitool raw 0x04 0x12 Data[1:N]  
ipmitool raw 0x04 0x13 Get PEF Configuration Parameters(30.4) ipmitool raw 0x04 0x13 Data[1:3] ipmitool pef list
ipmitool raw 0x04 0x14 Set Last Processed Event ID(30.5) ipmitool raw 0x04 0x14 Data[1:3]  
ipmitool raw 0x04 0x15 Get Last Processed Event ID(30.6) ipmitool raw 0x04 0x15 ipmitool pef status
ipmitool raw 0x04 0x16 Alert Immediate(30.7) ipmitool raw 0x04 0x16 Data[1:3]  
ipmitool raw 0x04 0x17 PET Acknowledge(30.8)    
ipmitool raw 0x04 0x20 Get Device SDR Info(35.2)    
ipmitool raw 0x04 0x21 Get Device SDR(35.3)    
ipmitool raw 0x04 0x22 Reserve Device SDR Repository(35.4)    
ipmitool raw 0x04 0x23 Get Sensor Reading Factors(35.5)    
ipmitool raw 0x04 0x24 Set Sensor Hysteresis(35.6)    
ipmitool raw 0x04 0x25 Get Sensor Hysteresis(35.7)    
ipmitool raw 0x04 0x26 Set Sensor Threshold(35.8)    
ipmitool raw 0x04 0x27 Get Sensor Threshold(35.9)    
ipmitool raw 0x04 0x28 Set Sensor Event Enable(35.1)    
ipmitool raw 0x04 0x29 Get Sensor Event Enable(35.11)    
ipmitool raw 0x04 0x2A Re-arm Sensor Events(35.12)    
ipmitool raw 0x04 0x2B Get Sensor Event Status(35.13)    
ipmitool raw 0x04 0x2D Get Sensor Reading(35.14)    
ipmitool raw 0x04 0x2E Set Sensor Type(35.15)    
ipmitool raw 0x04 0x2F Get Sensor Type(35.16)    
ipmitool raw 0x04 0x30 Set Sensor Reading And Event Status(35.17)    

 

参考IPMI Spec中的部分Appendix G。

ipmi spec sensor


Read More

ipmitool命令与raw命令与ipmi spec对照表3-NETFN_APP


ipmitool命令与raw命令与ipmi spec对照表3-NETFN_APP

raw命令索引 对应IPMI Spec的章节 raw命令格式 字符串命令
ipmitool raw 0x06 0x01 Get Device ID(20.1)    
ipmitool raw 0x06 0x02 Cold Reset(20.2) ipmitool raw 0x06 0x02 ipmitool mc reset cold
ipmitool raw 0x06 0x03 Warm reset ipmitool raw 0x06 0x03 ipmitool mc reset warm
ipmitool raw 0x06 0x04 Get Self Test Results(20.4) ipmitool raw 0x06 0x04 ipmitool mc selftest
ipmitool raw 0x06 0x05 Manufacturing Test On(20.5) ipmitool raw 0x06 0x05  
ipmitool raw 0x06 0x06 Set ACPI Power State(20.6) ipmitool raw 0x06 0x06 Data[1:2]  
ipmitool raw 0x06 0x07 Get ACPI Power State(20.7) ipmitool raw 0x06 0x07  
ipmitool raw 0x06 0x08 Get Device GUID(20.8) ipmitool raw 0x06 0x08  
ipmitool raw 0x06 0x09 Get NetFn Support(21.2) ipmitool raw 0x06 0x09 Data[1]  
ipmitool raw 0x06 0x0A Get Command Support(21.3) ipmitool raw 0x06 0x0a Data[1:3]  
ipmitool raw 0x06 0x0B Get Command Sub-function Support(21.4) ipmitool raw 0x06 0x0b Data[1:4]  
ipmitool raw 0x06 0x0C Get Configurable Commands(21.5) ipmitool raw 0x06 0x0c Data[1:3]  
ipmitool raw 0x06 0x0D Get Configurable Command Sub-functions(21.6) ipmitool raw 0x06 0x0d Data[1:4]  
ipmitool raw 0x06 0x61 Get Command Enables(21.8)    
ipmitool raw 0x06 0x64 Get OEM NetFn IANA Support(21.11)    
ipmitool raw 0x06 0x22 Reset Watchdog Timer(27.5) ipmitool raw 0x06 0x22 ipmitool mc watchdog reset
ipmitool raw 0x06 0x24 Set Watchdog Timer(27.6) ipmitool raw 0x06 0x24 Data[1:6] ipmitool mc watchdog off
ipmitool raw 0x06 0x25 Get Watchdog Timer(27.7) ipmitool raw 0x06 0x25 ipmitool mc watchdog get
ipmitool raw 0x06 0x2E Set BMC Global Enables(22.1) ipmitool raw 0x06 0x2e Data[1] ipmitool mc setenables
ipmitool raw 0x06 0x2F Get BMC Global Enables(22.2) ipmitool raw 0x06 0x2f ipmitool mc getenables
ipmitool raw 0x06 0x30 Clear Message Flags(22.3) ipmitool raw 0x06 0x30 Data[1]  
ipmitool raw 0x06 0x31 Get Message Flags(22.4) ipmitool raw 0x06 0x31  
ipmitool raw 0x06 0x32 Enable Message Channel Receive(22.5) ipmitool raw 0x06 0x32 Data[1:2]  
ipmitool raw 0x06 0x33 Get Message(22.6)    
ipmitool raw 0x06 0x34 Send Message(22.7)    
ipmitool raw 0x06 0x35 Read Event Message Buffer(22.8) ipmitool raw 0x06 0x35  
ipmitool raw 0x06 0x36 Get BT Interface Capabilities(22.1)    
ipmitool raw 0x06 0x37 Get System GUID(22.14)    
ipmitool raw 0x06 0x58 Set System Info Parameters(22.14a)    
ipmitool raw 0x06 0x59 Get System Info Parameters(22.14b)    
ipmitool raw 0x06 0x38 Get Channel Authentication Capabilities(22.13)    
ipmitool raw 0x06 0x39 Get Session Challenge(22.15)    
ipmitool raw 0x06 0x3A Activate Session(22.17)    
ipmitool raw 0x06 0x3B Set Session Privilege Level(22.18)    
ipmitool raw 0x06 0x3C Close Session(22.19)    
ipmitool raw 0x06 0x3D Get Session Info(22.2)    
ipmitool raw 0x06 0x3F Get AuthCode(22.21)    
ipmitool raw 0x06 0x40 Set Channel Access(22.22)    
ipmitool raw 0x06 0x41 Get Channel Access(22.23)    
ipmitool raw 0x06 0x42 Get Channel Info Command(22.24)    
ipmitool raw 0x06 0x43 Set User Access Command(22.26)    
ipmitool raw 0x06 0x44 Get User Access Command(22.27)    
ipmitool raw 0x06 0x45 Set User Name(22.28)    
ipmitool raw 0x06 0x46 Get User Name Command(22.29)    
ipmitool raw 0x06 0x47 Set User Password Command(22.3)    
ipmitool raw 0x06 0x48 Activate Payload(24.1) ipmitool raw 0x06 0x48 Data[1:6]  
ipmitool raw 0x06 0x49 Deactivate Payload(24.2) ipmitool raw 0x06 0x49 Data[1:6]  
ipmitool raw 0x06 0x4A Get Payload Activation Status(24.4)    
ipmitool raw 0x06 0x4B Get Payload Instance Info(24.5)    
ipmitool raw 0x06 0x4C Set User Payload Access(24.6)    
ipmitool raw 0x06 0x4D Get User Payload Access(24.7)    
ipmitool raw 0x06 0x4E Get Channel Payload Support(24.8)    
ipmitool raw 0x06 0x4F Get Channel Payload Version(24.9)    
ipmitool raw 0x06 0x50 Get Channel OEM Payload Info(24.1)    
ipmitool raw 0x06 0x52 Master Write-Read(22.11)    
ipmitool raw 0x06 0x54 Get Channel Cipher Suites(22.15)    
ipmitool raw 0x06 0x55 Suspend/Resume Payload Encryption(24.3)    
ipmitool raw 0x06 0x56 Set Channel Security Keys(22.25)    
ipmitool raw 0x06 0x57 Get System Interface Capabilities(22.9) ipmitool raw 0x06 0x57 Data[1]  

Read More

uboot下的mii命令简介


uboot下有一个mii命令。命令帮助信息如下:

mii - MII utility commands                                                      
                                                                                
Usage:                                                                          
mii device                     - list available devices                         
mii device            - set current device                             
mii info                 - display MII PHY info                           
mii read            - read  MII PHY  register             
mii write     - write MII PHY  register             
mii dump            - pretty-print   (0-5 only)           
Addr and/or reg may be ranges, e.g. 2-7. 

 

mii device示例,会输出MDC/MDIO总线设备

uboot>mii device                                                           
MII devices: 'FSL_MDIO0' 'FM_TGEC_MDIO'
Current device: 'FSL_MDIO0'

 

mii info打印输出,PHY后面跟的就是addr

uboot> mii info
PHY 0x00: OUI = 0x5043, Model = 0x1D, Rev = 0x01, 1000baseT, FDX
PHY 0x01: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX
PHY 0x02: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX
PHY 0x03: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX
PHY 0x04: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX
PHY 0x05: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX
PHY 0x06: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX
PHY 0x07: OUI = 0x0000, Model = 0x00, Rev = 0x00,  10baseT, HDX

 

mii read          - read  MII PHY register            
mii write   - write MII PHY register  

上述两个命令,需要根据具体的芯片手册寄存器设置来进行配置。以下命令为示例

mii write 0 0 0x8000    向地址为0的phy芯片的0寄存器写入0x8000

mii  read 0 0     读取地址为0的phy芯片的寄存器0的值


Read More

ipmitool命令与raw命令与ipmi spec对照表1-NETFN_CHASSIS


ipmitool命令与raw命令与ipmi spec对照表1-NETFN_CHASSIS

raw命令索引 对应IPMI Spec的章节 raw命令格式 字符串命令
ipmitool raw 0x00 0x00 Get Chassis Capabilities(28.1) ipmitool raw 0x00 0x00  
ipmitool raw 0x00 0x01 Get Chassis Status(28.2) ipmitool raw 0x00 0x01 ipmitool raw 0x00 0x01
ipmitool chassis status
ipmitool power status
ipmitool chassis power status
ipmitool chassis poh
ipmitool raw 0x00 0x02 Chassis Control(28.3) ipmitool raw 0x00 0x02 0x00 ipmitool chassis power off
ipmitool power off
ipmitool raw 0x00 0x04 Chassis Identify(28.5) ipmitool raw 0x00 0x04 [Data[1:2]] ipmitool chassis identify
ipmitool raw 0x00 0x0A Set Front Panel Button Enables(28.6) ipmitool raw 0x00 0x0a Data[1]  
ipmitool raw 0x00 0x05 Set Chassis Capabilities(28.7) ipmitool raw 0x00 0x05 Data[1:6]  
ipmitool raw 0x00 0x06 Set Power Restore Policy(28.8) ipmitool raw 0x00 0x06 Data[1] ipmitool chassis policy
ipmitool raw 0x00 0x0B Set Power Cycle Interval(28.9) ipmitool raw 0x00 0x0b Data[1]  
ipmitool raw 0x00 0x07 Get System Restart Cause(28.11) ipmitool raw 0x00 0x07 ipmitool chassis restart_cause
ipmitool raw 0x00 0x08 Set System Boot Options(28.12) ipmitool raw 0x00 0x08 Data[1:6] ipmitool chassis bootdev
ipmitool chassis bootparam set bootflag
ipmitool raw 0x00 0x09 Get System Boot Options(28.13) ipmitool raw 0x00 0x09 Data[1:3] ipmitool chassis bootparam get 0x05
ipmitool raw 0x00 0x0F Get POH Counter(28.14) ipmitool raw 0x00 0x0F ipmitool chassis poh

 

参考IPMI Spec中的部分Appendix G。

ipmi chassis


Read More


© 2008-2022 CunYouLu存有录博客 村友录 存有录 鲁ICP备08005943号