透過 #lshw 的功能可以檢視系統的硬體設施. 包括記憶體組態 (memory configuration),韌體版本 (firmware version),主機板組態 (mainboard configuration),處理器版本以及速度 (CPU version and speed),快取組態 (cache configuration),匯流排速度 (bus speed), 等…..
測試環境為 CentOS 7 (適用於 RHEL)
[root@benjr ~]# yum whatprovides lshw [root@benjr ~]# yum install lshw
不過單使用 lshw 的資訊會太多而且要等一陣子才會有完整資料出現.
[root@benjr ~]# lshw
顯示在螢幕時會太快速,我們這時候可以導到文字檔稍後來看.
[root@benjr ~]# lshw > hw.txt [root@benjr ~]# cat hw.txt |more
當然我們也可以一項項的來看,只要使用參數 -c [device] 即可.
[root@benjr ~]# lshw -c video *-display description: VGA compatible controller product: SVGA II Adapter vendor: VMware physical id: f bus info: pci@0000:00:0f.0 version: 00 width: 32 bits clock: 33MHz capabilities: vga_controller bus_master cap_list rom configuration: driver=vmwgfx latency=64 resources: irq:16 ioport:10d0(size=16) memory:d8000000-dbffffff memory:d0800000-d0ffffff memory:c0000000-c0007fff
至於哪些裝置可以看可以先用 #lshw -short , #lshw -businfo 來查詢.
[root@benjr ~]# lshw -short H/W path Device Class Description ================================================== system Server() /0 bus Server /0/0 memory 64KiB BIOS /0/4 processor Intel(R) Xeon(R) CPU E5520 @ 2.27GHz /0/100 bridge 5500 I/O Hub to ESI Port /0/100/1 bridge 5520/5500/X58 I/O Hub PCI Express Root Port 1 /0/100/1/0 eth0 network 82575EB Gigabit Network Connection /0/100/13 generic 7500/5520/5500/X58 I/O Hub I/OxAPIC Interrupt Controller /0/100/1e/3 display MGA G200eW WPCM450 /0/100/1f.2 storage 82801JI (ICH10 Family) SATA AHCI Controller
大概有 bus , memory , processor , bridge , network , generic , display , storage 可以查詢,#lshw -short 與 #lshw -businfo 可以得到差不多的結果.
[root@benjr ~]# lshw -businfo
沒有解決問題,試試搜尋本站其他內容
One thought on “linux command – lshw (list hardware)”