Linux下顯示硬體資訊(二)–lshw

來源:互聯網
上載者:User

 

2009-03-25 20:35:09

標籤:linux

作者:FinalBSD
原載: [url]http://www.sanotes.net/html/y2009/316.html[/url]
著作權。轉載時必須以連結形式註明作者和原始出處及本聲明。

lshw
lshw(Hardware Lister)是另外一個可以查看硬體資訊的工具,不僅如此,它還可以用來做一些硬體的benchmark。
這個工具其實就是用/proc裡面讀取一些檔案來顯示相關的資訊,它用到了如下檔案和目錄(下的檔案):
/proc/cpuinfo 顯示CPU資訊
/proc/bus/pci 顯示pci資訊
/proc/scsi 顯示scsi資訊
/proc/net/dev 顯示網路裝置資訊
/proc/kcore 從記憶體映像讀取相關資訊
/proc/ide 顯示IDE裝置資訊
/proc/devices
/proc/mounts
/proc/fstab

下載和安裝:
-------------------------------------------------------------
cd /tmp
wget [url]http://ezix.org/software/files/lshw-B.02.14.tar.gz[/url]
tar lshw-B.02.14.tar.gz
cd lshw-B.02.14
make && make install
-------------------------------------------------------------
用法:
1.最簡單的用法:
# lshw
和dmidecode一樣,輸出一大堆的東西。
2. 以html/xml格式輸出
# lshw -html >info.html
# lshw -xml >info.xml

3. 顯示裝置列表,輸出包括裝置路徑(path)、類別(class)以及簡單描述
# lshw -short

4. 顯示裝置列表,輸出包括匯流排資訊、SCSI、USB、IDE、PCI地址等。
# lshw -businfo
5. 顯示指定類別的裝置
# lshw -C class
# lshw -class class
這裡的class可以通過lshw -short來查看。比如
# lshw -C memory
相對來說lshw相信的資訊比較簡單,沒有dmidecode豐富。

 

lshw-gtk 有可視化gui,更方便!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.