【Linux】查看物理CPU个数、核数、逻辑CPU个数
①物理cpu数:主板上实际插入的cpu数量,可以数不重复的 physical id 有几个(physical id)
cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l
②cpu核数:单块CPU上面能处理数据的芯片组的数量,如双核、四核等 (cpu cores)
cat /proc/cpuinfo| grep "cpu cores"| uniq
③逻辑cpu数:简单来说,它可使处理器中的1颗内核,如2颗内核那样在操作系统中发挥作用。
cat /proc/cpuinfo| grep "processor"| wc -l
④查看cpu信息(型号)
cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
xxxx@ubuntu:~$ free -m
total used free shared buff/cache available
Mem: 64391 12022 1280 20 51087 51664
Swap: 15258 510 14748
xxxx@ubuntu:~$ cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
2
xxxx@ubuntu:~$ cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores : 10
xxxx@ubuntu:~$ cat /proc/cpuinfo | grep "processor" | wc -l
40
xxxx@ubuntu:~$ cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
40 Intel(R) Xeon(R) CPU E5-2670 v2 @ 2.50GHz
总核数 = 物理CPU个数 × 每颗物理CPU的核数;
总逻辑CPU数 = 物理CPU个数 ×每颗物理CPU的核数 × 超线程数。
结论:所以这算双核的。
【Linux】查看物理CPU个数、核数、逻辑CPU个数的更多相关文章
- Linux查看物理CPU个数,核数,逻辑CPU个数;内存信息
# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数 cat /proc/cpuinfo| ...
- 【linux】linux 查看物理CPU个数、核数、逻辑CPU个数
①物理cpu数:主板上实际插入的cpu数量,可以数不重复的 physical id 有几个(physical id) cat /proc/cpuinfo| grep "physical id ...
- 物理CPU,物理CPU内核,逻辑CPU概念详解
1.说明 CPU(Central Processing Unit)是中央处理单元, 本文介绍物理CPU,物理CPU内核,逻辑CPU, 以及他们三者之间的关系, 一个物理CPU可以有1个或者多个物理内核 ...
- 如何查找物理cpu,cpu核心和逻辑cpu的数量
环境 Red Hat Enterprise Linux 4 Red Hat Enterprise Linux 5 Red Hat Enterprise Linux 6 Red Hat Enterpri ...
- Linux查看物理CPU个数、核数、逻辑CPU个数
# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数 cat /proc/cpuinfo| ...
- [转]Linux查看物理CPU个数、核数、逻辑CPU个数
From : http://www.cnblogs.com/emanlee/p/3587571.html # 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个 ...
- Linux查看物理CPU个数、核数、逻辑CPU个数(转载)
# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数cat /proc/cpuinfo| g ...
- Linux查看物理CPU个数、核数、逻辑CPU个数 (转)
# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数 cat /proc/cpuinfo| ...
- 【转】Linux查看物理CPU个数、核数、逻辑CPU个数
# 总核数 = 物理CPU个数 X 每颗物理CPU的核数 # 总逻辑CPU数 = 物理CPU个数 X 每颗物理CPU的核数 X 超线程数 # 查看物理CPU个数cat /proc/cpuinfo| g ...
- Linux查看物理CPU个数、核数,逻辑CPU个数
学习swoole的时候,建议开启的worker进程数为cpu核数的1-4倍.于是就学习怎么查看CPU核数 # 查看物理CPU个数 cat /proc/cpuinfo| grep "physi ...
随机推荐
- 通过select下拉框里的value控制div显示与隐藏
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- Kolya and Tandem Repeat
Kolya and Tandem Repeat time limit per test 2 seconds memory limit per test 256 megabytes input s ...
- C++ 工具类 —— 词条类(Entry)
Entry 以键值对(key-value pair)的形式定义. template <typename K, typename V> struct Entry{ K key; V valu ...
- [React Router v4] Use Regular Expressions with Routes
We can use regular expressions to more precisely define the paths to our routes in React Router v4. ...
- log4erl API
https://github.com/ahmednawras/log4erl/blob/master/API.txt NOTE:=====Please be informed that the API ...
- X Window 简单的新手教程
1.X Window 系统的窗体显示原理: http://www.ibm.com/developerworks/cn/linux/l-cn-xwin/ 2.X Window 程式设计入门--第二章 X ...
- 一个完整的Erlang应用
http://blog.chinaunix.net/uid-25876834-id-3308693.html 这里介绍构建一个完整的Erlang/OTP应用的例子,最后还给出了一个在实际生成环境中,如 ...
- Shell脚本实现在Linux系统中自动安装JDK
A:本脚本运行的机器,Linux B:待安装JDK的机器, Linux 首先在脚本运行的机器A上确定可以ssh无密码登录到待安装jdk的机器B上,然后就可以在A上运行本脚本: 复制代码 代码如下: $ ...
- Leetcode--easy系列1
近期開始刷Leetcode题目.花了一个星期先完毕了easy难度级别的题目,easy级别的题目思路比較简单,但不一定就直接AC了,主要是问题要考虑全然.特别是对特殊情况的处理. #6 ZigZag C ...
- 【14.94%】【codeforces 611E】New Year and Three Musketeers
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...