linux 下查看机器是cpu是几核的(转)
几个cpu
more /proc/cpuinfo |grep "physical id"|uniq|wc -l
每个cpu是几核(假设cpu配置相同)
more /proc/cpuinfo |grep "physical id"|grep "0"|wc -l
cat /proc/cpuinfo | grep processor
1. 查看物理CPU的个数
#cat /proc/cpuinfo |grep "physical id"|sort |uniq|wc -l
2. 查看逻辑CPU的个数
#cat /proc/cpuinfo |grep "processor"|wc -l
3. 查看CPU是几核
#cat /proc/cpuinfo |grep "cores"|uniq
4. 查看CPU的主频
#cat /proc/cpuinfo |grep MHz|uniq
# uname -a
Linux euis1 2.6.9-55.ELsmp #1 SMP Fri Apr 20 17:03:35 EDT 2007 i686 i686 i386 GNU/Linux
(查看当前操作系统内核信息)
# cat /etc/issue | grep Linux
Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
(查看当前操作系统发行版信息)
# cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
8 Intel(R) Xeon(R) CPU E5410 @ 2.33GHz
(看到有8个逻辑CPU, 也知道了CPU型号)
# cat /proc/cpuinfo | grep physical | uniq -c
4 physical id : 0
4 physical id : 1
(说明实际上是两颗4核的CPU)
# getconf LONG_BIT
32
(说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)
# cat /proc/cpuinfo | grep flags | grep ' lm ' | wc -l
8
(结果大于0, 说明支持64bit计算. lm指long mode, 支持lm则是64bit)
如何获得CPU的详细信息:
linux命令:cat /proc/cpuinfo
用命令判断几个物理CPU,几个核等:
逻辑CPU个数:
# cat /proc/cpuinfo | grep "processor" | wc -l
物理CPU个数:
# cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l
每个物理CPU中Core的个数:
# cat /proc/cpuinfo | grep "cpu cores" | wc -l
是否为超线程?
如果有两个逻辑CPU具有相同的”core id”,那么超线程是打开的。
每个物理CPU中逻辑CPU(可能是core, threads或both)的个数:
# cat /proc/cpuinfo | grep "siblings"
linux 下查看机器是cpu是几核的(转)的更多相关文章
- linux 下查看机器是cpu是几核的
几个cpu more /proc/cpuinfo |grep "physical id"|uniq|wc -l 每个cpu是几核(假设cpu配置相同) more /proc/cpu ...
- 【ARM-Linux开发】Linux下查看机器的CPU负载
负载(load)是Linux机器的一个重要指标,直观了反应了机器当前的状态.如果机器负载过高,那么对机器的操作将难以进行. Linux的负载高,主要是由于CPU使用.内存使用.IO消耗三部分构成.任意 ...
- [转载] linux 下查看机器cpu是几核的
linux 下查看机器cpu是几核的 本文转自”映月的博客“:http://wurhuangfeng.blog.163.com/blog/static/35178241201111235829116/ ...
- Linux下查看内核、CPU、内存及各组件版本的命令和方法
Linux下查看内核.CPU.内存及各组件版本的命令和方法 Linux查看内核版本: uname -a more /etc/*release ...
- 性能测试分析过程(三)linux下查看最消耗CPU/内存的进程
linux下查看最消耗CPU 内存的进程 1.CPU占用最多的前10个进程: ps auxw|head -1;ps auxw|sort -rn -k3|head -10 2.内存消耗最多的前10 ...
- linux下查看机器的硬件信息:
查看CPU信息(型号) # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c 8 Intel(R) Xeon(R) CPU ...
- linux下查看最消耗CPU、内存的进程
2012-11-19 15:38:04 分类: LINUX 1.CPU占用最多的前10个进程: ps auxw|head -1;ps auxw|sort -rn -k3|head -10 2.内存消耗 ...
- linux下查看机器配置
查看cpu信息:lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): ...
- linux_ linux下查看最消耗CPU、内存的进程 20
1.CPU占用最多的前10个进程: ps auxw|head -1;ps auxw|sort -rn -k3|head -10 2.内存消耗最多的前10个进程 ps auxw|head -1;ps a ...
随机推荐
- 腾讯微博数据抓取(java实现)
不多说,同样贴出相关代码 参数实体: package token.def; import java.io.Serializable; import java.util.Properties; publ ...
- SharePoint 2013 开发——开发并部署Provider-hosted APP
博客地址:http://blog.csdn.net/FoxDave 本篇我们用Visual Studio创建并部署一个SharePoint Provider-hosted应用程序. 打开Visua ...
- Be Careful With BuildConfig.DEBUG
Be Careful With BuildConfig.DEBUG http://www.digipom.com/be-careful-with-buildconfig-debug/
- 用javascript正则表达式来格式化金额
<html><head><script> function a() { var amount = "-22334.334455"; //if(/ ...
- 转载:node.js socket.io
本文转自:http://www.xiaocai.name/post/cf1f9_7b6507 学习node.js socket.io 使用 用node.js(socket.io)实现数据实时推送 在 ...
- PB常用日期
用一条语句写成的有关日期函数 //1.生肖(年份参数:int ls_year 返回参数:string): mid(fill('鼠牛虎兔龙蛇马羊猴鸡狗猪',48),(mod(ls_year -1900 ...
- linux命令:mkdir
1.介绍: mkdir用来创建目录,要求创建目录的用户在当前目录具有写的权限. 2.命令格式: mkdir [选项] 目录 3.命令参数 -m, --mode=模式,设定权限<模式> (类 ...
- Android Studio And Gradle
AS特色: 智能感知体验特好,堪比VS 布局预览,手写布局后预览页面即时显示,便于布局调整和优化 编辑速度飞快流畅,毫无eclipse的卡顿 布局或源码中有图标和颜色的预览,十分直观 调试时体验极佳 ...
- Blocks_DP&&矩阵快速幂
参考资料:http://www.tuicool.com/articles/beiyAv [题意]有n块砖.现要将砖全部染上红.蓝.绿.黄四种颜色.要求被染成红色和绿色的砖块数量必须为偶数,问一共有多少 ...
- 10、C#基础整理(集合)
集合 1.集合的引用 using System.Collections;//添加类 2.定义集合(ArrayList 或 Array) ArrayList arr = new ArrayList(); ...