In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is a detailed introduction to "how to view the number of CPUs in linux". The content is detailed, the steps are clear, and the details are properly handled. I hope this article "how to view the number of CPUs in linux" can help you solve your doubts. Let's go deeper and learn new knowledge together with the ideas of Xiaobian.
View method: 1, execute "cat /proc/cpuinfo"| grep "physical id"| sort |uniq| wc -l"command;2, execute"cat /proc/cpuinfo| grep "processor"| wc -l"command.
This tutorial operates on Linux 5.9.8 and Dell G3 computers.
Linux View the CPU of the machine
1. Check the number of physical CPUs
cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
2. View the number of logical CPUs (threads)
cat /proc/cpuinfo |grep "processor"|wc -l
3, check the CPU is a few cores
cat /proc/cpuinfo |grep "cores"|uniq
4, check the CPU frequency
cat /proc/cpuinfo |grep MHz|uniq
Extended knowledge:
uname -a
Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux(View current operating system kernel info)
cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)(View current OS release information)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
8 Intel(R) Xeon(R) CPU E5410 @2.33GHz (see 8 logical CPUs, also know CPU model)
cat /proc/cpuinfo | grep physical | uniq -c
4 physical id : 0 4 physical id : 1(indicating that it is actually two 4-core CPUs)
getconf LONG_BIT
32(indicates that the current CPU is running in 32bit mode, but does not mean that the CPU does not support 64bit)
cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
8(The result is greater than 0, indicating that 64bit calculation is supported.) lm refers to long mode, support lm is 64bit) read here, this article "linux how to view the number of cpu" article has been introduced, want to master the knowledge of this article also need to practice to understand, if you want to know more about the content of the article, welcome to pay attention to the industry information channel.
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.