複数のCPUパッケージのCPUコアの一覧表示

複数のCPUパッケージのCPUコアの一覧表示

CPUコアと各CPUコアの詳細を取得する必要があります。私はcat /proc/cpuinfoコマンドを使用して動作します。ただし、複数のCPUパッケージの情報を取得する必要があります。単一のCPUパッケージしかありません。この場合、出力はどのように見えますか?

CPU設定例:CPUパッケージ2個:CPUパッケージ1:Core i7-2000(物理コア4個、論理コア8個)、CPUパッケージ2:Core i7-3000(物理コア4個、論理コア8個)、合計物理コア8個、16個の論理コア。

例1:

processor   : 0
.   other info for same core
model name  : Intel(R) Core(TM) i7-2000
.
.   other cores for same CPU package
.
processor   : 7
.   other info for same core
model name  : Intel(R) Core(TM) i7-2000
.
processor   : 8
.   other info for same core
model name  : Intel(R) Core(TM) i7-3000
.
.   other cores for same CPU package
.
processor   : 15
.   other info for same core
model name  : Intel(R) Core(TM) i7-3000

または例2:

processor   : 0
.   other info for same core
model name  : Intel(R) Core(TM) i7-2000
.
.   other cores for same CPU package
.
processor   : 7
.   other info for same core
model name  : Intel(R) Core(TM) i7-2000
.
processor   : 0
.   other info for same core
model name  : Intel(R) Core(TM) i7-3000
.
.   other cores for same CPU package
.
processor   : 7
.   other info for same core
model name  : Intel(R) Core(TM) i7-3000


OS: Debian-like Linux, Kernel: 4.19

ベストアンサー1

複数の物理CPUパッケージを含む設定では、他のモデル名は表示されません。すべてのCPUが一致する必要があります。ほとんどの場合、列挙順序は物理パックを順番に通過すると予想されます/proc/cpuinfoが、これは保証されません。物理ソケットごとに論理コアをグループ化するにはphysical id/proc/cpuinfo単一ソケットのすべてのコアは同じ物理IDを持ち、そのコアに制限されます。

おすすめ記事