天天看點

檢視Linux伺服器配置參數指令

檢視Linux伺服器配置參數指令 Linux檢視實體CPU個數、核數、邏輯CPU個數 一般阿裡雲買的伺服器查詢的都是邏輯cpu數 # cat /proc/cpuinfo| grep "processor"| wc -l

檢視Linux伺服器配置參數指令

Linux檢視實體CPU個數、核數、邏輯CPU個數

1.實體cpu數:主機闆上實際插入的cpu數量,可以數不重複的 physical id 有幾個(physical id)

cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

2.cpu核數:單塊CPU上面能處理資料的晶片組的數量,如雙核、四核等 (cpu cores)

cat /proc/cpuinfo| grep "cpu cores"| uniq

3.邏輯cpu數:簡單來說,它可使處理器中的1顆核心,如2顆核心那樣在作業系統中發揮作用。

cat /proc/cpuinfo| grep "processor"| wc -l

4.檢視cpu資訊(型号)

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

總核數 = 實體CPU個數 × 每顆實體CPU的核數;

總邏輯CPU數 = 實體CPU個數 ×每顆實體CPU的核數 × 超線程數。

=================

一般阿裡雲買的伺服器查詢的都是邏輯cpu數

# cat /proc/cpuinfo| grep "processor"| wc -l

4

繼續閱讀