Linux檢視版本資訊及CPU核心、型號等

germany006發表於2014-05-20
轉載地址:

Linux下如何檢視版本資訊, 包括位數和多核資訊,今天我們就來一起看看linux 檢視版本資訊以及檢視CPU核心資訊、CPU具體型號等等,整個CPU資訊一目瞭然。相信不會讓大家失望。

# uname -a
Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
(Linux檢視版本當前作業系統核心資訊)

# cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
(Linux檢視版本當前作業系統發行版資訊)

# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
8 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
(Linux檢視cpu有8個邏輯CPU, 也知道了CPU型號)

# cat /proc/cpuinfo | grep physical | uniq -c
4 physical id : 0
4 physical id : 1
(Linux檢視版本說明實際上是兩顆4核的CPU)

# getconf LONG_BIT
32
(Linux檢視版本說明當前CPU執行在32bit模式下, 但不代表CPU不支援64bit)

# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
8
(結果大於0, 說明支援64bit計算. lm指long mode, 支援lm則是64bit)

最後再完整看cpu物理資訊, 不過大部分我們都不關心而已.
# dmidecode | grep -A48 'Processor Information$'



1,檢視伺服器型號、序列號:

[root@localho ~]#dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product|Serial"  
       Manufacturer: Dell Inc.
       Product Name: PowerEdge R515
       Serial Number: 7P9H83X


2.Linux 檢視記憶體的插槽數,已經使用多少插槽.每條記憶體多大

[root@localhost ~]#dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range
       Size: 4096 MB
       Size: 4096 MB
       Size: No Module Installed
       Size: No Module Installed
       Size: 4096 MB
       Size: 4096 MB
       Size: No Module Installed
       Size: No Module Installed


3.Linux 檢視記憶體的頻率

[root@localhost ~]#dmidecode|grep -A16 "Memory Device"|grep 'Speed' 
       Speed: 1600 MHz (0.6 ns)
       Speed: 1600 MHz (0.6 ns)
       Speed: Unknown
       Speed: Unknown
       Speed: 1600 MHz (0.6 ns)
       Speed: 1600 MHz (0.6 ns)
       Speed: Unknown
       Speed: Unknown

轉載地址:

linux檢視主機板型號及記憶體硬體資訊

 檢視主機板型號:

dmidecode |grep -A16 "System Information$"

記憶體槽及記憶體條:

dmidecode |grep -A16 "Memory Device$"

硬碟:

fdisk -l

smartctl -a /dev/sda

網路卡:

mii-tool

轉載地址:


Linux中檢視CPU、記憶體、型號、版本資訊

cat /proc/cpuinfo中的資訊

  • processor       邏輯處理器的id。
  • physical id    物理封裝的處理器的id。
  • core id        每個核心的id。
  • cpu cores      位於相同物理封裝的處理器中的核心數量。
  • siblings       位於相同物理封裝的處理器中的邏輯處理器的數量。

  

1 檢視物理CPU的個數
#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc –l

2、   檢視邏輯CPU的個數
#cat /proc/cpuinfo |grep "processor"|wc –l

3、  檢視CPU是幾核
#cat /proc/cpuinfo |grep "cores"|uniq

4、  檢視CPU的主頻
#cat /proc/cpuinfo |grep MHz|uniq 

5、  # uname -a

6、  Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux

  (檢視當前作業系統核心資訊)

7、  # cat /etc/issue | grep Linux

8、  Red Hat Enterprise Linux AS release 4 (Nahant Update 5(檢視當前作業系統發行版資訊)

9、  # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

     8  Intel(R) Xeon(R) CPU   E5410   @ 2.33GHz

    (看到有8個邏輯CPU, 也知道了CPU型號)

     9   # cat /proc/cpuinfo | grep physical | uniq -c

     4   physical id      : 0

     4 physical id      : 1

(說明實際上是兩顆4核的CPU)

 

  10、# getconf LONG_BIT

32

       (說明當前CPU執行在32bit模式下, 但不代表CPU不支援64bit)

 

11、# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc –l

8(結果大於0, 說明支援64bit計算. lm指long mode, 支援lm則是64bit)

 

12、如何獲得CPU的詳細資訊:

  linux命令:cat /proc/cpuinfo

  13、用命令判斷幾個物理CPU,幾個核等:

  邏輯CPU個數:
   # cat /proc/cpuinfo | grep "processor" | wc -l

  物理CPU個數:
   # cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

  14、每個物理CPU中Core的個數:
   # cat /proc/cpuinfo | grep "cpu cores" | wc -l

  15、是否為超執行緒?如果有兩個邏輯CPU具有相同的”core id”,那麼超執行緒是開啟的。每個物理CPU中邏輯CPU(可能是core, threads或both)的個數:
# cat /proc/cpuinfo | grep "siblings"

 

  1.檢視CPU資訊命令

  cat /proc/cpuinfo

  2.檢視記憶體資訊命令

  cat /proc/meminfo

  3.檢視硬碟資訊命令

  fdisk -l

4、檢視版本

cat /proc/version或者

cat /etc/issue | grep Linux

轉載地址:


自我總結:
 cat /etc/issue   //檢視linux的版本資訊

lsb_release -a  //檢視LSB本身的版本資訊

cat /proc/version

cat /etc/redhat-release

rpm -q redhat-release

file /bin/bash

file /bin/cat 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28371090/viewspace-1165229/,如需轉載,請註明出處,否則將追究法律責任。

相關文章