View cpu information

View CPU Information (Model)

[root@centos200 ~]# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c

      8  Intel(R) Core(TM) i7-4720HQ CPU @ 2.60GHz

 

# View the number of physical CPUs

[root@centos200 ~]# cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l

1

 

# View the number of cores in each physical CPU (ie, the number of cores)

[root@centos200 ~]# cat /proc/cpuinfo| grep "cpu cores"| uniq

cpu cores: 8

 

# View the number of logical CPUs (processors)

[root@centos200 ~]# cat /proc/cpuinfo| grep "processor"| wc -l

8

 

Relationship: 1 CPU has multiple cores, and 1 core can have multiple logical CPUs. Multiple logical CPUs are equivalent to simulating multiple CPUs.

1. Multiple physical CPUs, the CPU communicates through the bus, and the efficiency is relatively low

2. Multi-core CPU, different cores communicate through L2 cache, storage and peripherals communicate with CPU through bus

3. Multi-core hyperthreading, each core has two logical processing units, and the two cores share the resources of one core

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326079811&siteId=291194637