如何在linux中檢視cpu資訊、機器硬體型號
阿新 • • 發佈:2021-07-09
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 8 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
(看到有8個邏輯CPU, 也知道了CPU型號)
# cat /proc/cpuinfo | grep physical | uniq -c 4 physical id : 0 4 physical id : 1
(說明實際上是兩顆4核的CPU)
# getconf LONG_BIT 32
(說明當前CPU執行在32bit模式下, 但不代表CPU不支援64bit)
# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l 8
(結果大於0, 說明支援64bit計算. lm指long mode, 支援lm則是64bit)
再完整看cpu詳細資訊, 不過大部分我們都不關心而已.
# dmidecode | grep 'Processor Information' 檢視記憶體資訊 # cat /proc/meminfo # uname -a Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
(檢視當前作業系統核心資訊)
# cat /etc/issue | grep Linux Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
(檢視當前作業系統發行版資訊)
檢視機器型號
# dmidecode | grep "Product Name"
檢視網絡卡資訊
# dmesg | grep -i eth