Heim  >  Artikel  >  Betrieb und Instandhaltung  >  So überprüfen Sie die CPU-Auslastung in Centos

So überprüfen Sie die CPU-Auslastung in Centos

WBOY
WBOYOriginal
2022-02-08 15:55:4916877Durchsuche

在centos中,可以利用cat命令查看cpu的使用情况,该命令的作用是连接文件并打印到标准输出设备上,语法为“cat /proc/cpuinfo”。

So überprüfen Sie die CPU-Auslastung in Centos

本文操作环境:centos 6.4系统、Dell G3电脑。

centos怎么查看cpu使用情况

示例如下:

So überprüfen Sie die CPU-Auslastung in Centos

So überprüfen Sie die CPU-Auslastung in Centos

此图片则为服务器的CPU详细的运行情况,重点了解的是CPU为几颗,几核,是否支持超线程等,而在图片中我们么主要查看processor,physical id, siblings,core id,cpu cores这几个字段。

1.拥有相同physical id的所有逻辑处理器共享同一个物理插座。每个physical id 代表一个唯一的物理封装,即一颗CPU.

2.Siblings表示位于一个物理封装的CPU上逻辑CPU的个数。

3.每个core id 均代表一个唯一的处理器内核,所有带有相同core id 的逻辑CPU均位于同一处理器内核上。

4.如果有一个以上逻辑CPU有用相同的core id和physical id ,则说明系统支持超线程(HT)技术。

5.如果有两个或两个以上的逻辑CPU拥有相同的physical id ,但是core id不同,则说明这是一个多内核处理器,cpu cores字段也可以表示是否支持多内核。

可以通过以下方法查询CPU状态。

1.逻辑CPU个数:

cat /proc/cpuinfo | grep “processor” | wc –l

2.物理CPU个数:

cat /proc/cpuinfo | grep “physical id” | sort | uniq | wc –l

3.每个物理cpu中core的个数:

cat /proc/cpuinfo | grep “cpu cores” | wc –l

4.是否支持超线程?如果两个逻辑CPU具有相同的“core id”,那么说明超线程是打开的。

5.每个物理CPU中逻辑CPU的个数》

cat /proc/cpuinfo | grep “siblings”

6.physical id 都为0,说明只有一个物理处理器

7.processor有两个不同的编号,并且同属于一个physical id,同时cpu cores 的值为2,这也就说明了CPU是双核心的,并且每个核心只有一个逻辑处理器。

So überprüfen Sie die CPU-Auslastung in Centos

推荐教程:《centos教程

Das obige ist der detaillierte Inhalt vonSo überprüfen Sie die CPU-Auslastung in Centos. Für weitere Informationen folgen Sie bitte anderen verwandten Artikeln auf der PHP chinesischen Website!

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn