2011年4月21日 星期四

硬體資訊 查詢指令

若有些指令無法使用,先確認有沒有 su -

Server Name,Linux version,伺服器名稱,Linux 版本
uname -a
cat /proc/cpuinfo
cat /etc/*release
lsb_release -a
more /proc/version
dmesg | grep ' Linux version'
cat /etc/issue

CPU,中央處理器
dmidecode -t processor: 明白是幾 CPU 幾 core, 有無 hyperthead。
dmidecode -t cache: 查詢 L1, L2, L3 cache 的大小。

RAM,記憶體
dmidecode -t memory: 知道插了幾張 RAM 卡, 各張卡大小為何。
dmidecode -t slot: 查詢有那些插槽可用, 像是有幾個 PCI Express x16, 有幾個 PCI 32 bits 等。各個 slot 會顯示有無插卡。
free

Motherboard,主機板
dmidecode -t system: 主機的廠商。比方說買 Dell 的電腦, 可從這裡看到主機型號和序號。
dmidecode -t baseboard: 顯示 on-board 的設備, 像是網卡、音效卡之類的。

hd,硬碟
hdparm -i /dev/sda:先用 df 看是 hda 還是 sda,有些 linux sda(sata) 不能查(待查中)


其它幾個被提到的指令有 lspci 和 lsusb, 和檔案 /proc/cpuinfo 和 /proc/meminfo。可以看到不同細節。
lspci -vv 和 lspci -nn 不錯用。
有人提到查 driver 時可配合它使用。
Ubuntu 另有 lshw 會顯示詳細資訊, 不過用 dmidecode 就解決我原本的疑問了, 沒有仔細試它

部份內容參考來源:
http://fcamel-life.blogspot.com/2010/06/ubuntu.html

沒有留言:

張貼留言