In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the method of querying the number of CPU kernels in Linux, which has certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.
Take an Linux server as an example. This Linux includes two Intel (R) Xeon (R) CPU E5-2630 v4 @ 2.20GHz CPU, a single CPU includes 10 cpu core, and hyperthreading contains 20 logical cpu core. The official introduction: E5-2630 V4.
Next, let's find the corresponding parameters through the command of Linux to see if they are in line with the official introduction, mainly by looking at the information of / proc/cpuinfo.
Check the model of the CPU
Cat / proc/cpuinfo | grep 'model name' | sort | uniq output: model name: Intel (R) Xeon (R) CPU E5-2630 v4 @ 2.20GHz
Check the number of CPU
The number of CPU on the slot in the actual Server, the number of physical cpu, and the number of physical id that can not be repeated.
Cat / proc/cpuinfo | grep 'physical id' | sort | uniq | wc-l
Output: 2
Check the number of CPU cores
The number of chipsets on a CPU that can process data.
Cat / proc/cpuinfo | grep "cores" | uniq | awk'{print $4} 'output: 10
Logical CPU kernels
In general, we think that a cpu can have multiple cores, coupled with intel's hyperthreading technology (HT), one physical thread can be logically simulated into two threads to use, so that a single core can be used like two cores, so as to give full play to the performance of CPU.
Number of logical CPU = number of physical cpu x cpu cores this specification value x 2 (if hyperthreading is supported and enabled).
What the top command queries out is the number of logical CPU.
Cat / proc/cpuinfo | grep "processor" | wc-l output: 40 Thank you for reading this article carefully. I hope it will be helpful for everyone to share the method of querying CPU audit in Linux. At the same time, I also hope that you will support it, pay attention to the industry information channel, and find out if you encounter problems. Detailed solutions are waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.