几个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是几核的的更多相关文章

  1. linux 下查看机器是cpu是几核的(转)

    几个cpu more /proc/cpuinfo |grep "physical id"|uniq|wc -l 每个cpu是几核(假设cpu配置相同) more /proc/cpu ...

  2. 【ARM-Linux开发】Linux下查看机器的CPU负载

    负载(load)是Linux机器的一个重要指标,直观了反应了机器当前的状态.如果机器负载过高,那么对机器的操作将难以进行. Linux的负载高,主要是由于CPU使用.内存使用.IO消耗三部分构成.任意 ...

  3. [转载] linux 下查看机器cpu是几核的

    linux 下查看机器cpu是几核的 本文转自”映月的博客“:http://wurhuangfeng.blog.163.com/blog/static/35178241201111235829116/ ...

  4. Linux下查看内核、CPU、内存及各组件版本的命令和方法

    Linux下查看内核.CPU.内存及各组件版本的命令和方法 Linux查看内核版本: uname -a                        more /etc/*release       ...

  5. 性能测试分析过程(三)linux下查看最消耗CPU/内存的进程

    linux下查看最消耗CPU  内存的进程 1.CPU占用最多的前10个进程:  ps auxw|head -1;ps auxw|sort -rn -k3|head -10  2.内存消耗最多的前10 ...

  6. linux下查看机器的硬件信息:

    查看CPU信息(型号) # cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c       8  Intel(R) Xeon(R) CPU    ...

  7. linux下查看最消耗CPU、内存的进程

    2012-11-19 15:38:04 分类: LINUX 1.CPU占用最多的前10个进程: ps auxw|head -1;ps auxw|sort -rn -k3|head -10 2.内存消耗 ...

  8. linux下查看机器配置

    查看cpu信息:lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): ...

  9. 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 ...

随机推荐

  1. 作业5-需求分析(EX:南通大学成绩录入系统)

    产品利益相关者: 用户:南通大学各任课老师. 顾客:南通大学(教务处) 工程师:系统的开发,测试,维护,推广人员等 竞争性需求分析: N(需求) A(做法) B(好处) C(竞争) D(推广) 基础性 ...

  2. 第一次进div1了

    第一次进div1~好激动啊! 上帝依旧那么眷顾我!

  3. URl中文转ASCII

    编码 System.Web.HttpUtility.UrlEncode("中国", System.Text.Encoding.GetEncoding("GB2312&qu ...

  4. 使用Mysqldump 备份数据库

    使用Mysqldump 备份数据库 1.备份一个数据库 mysqldump --user [user name] --password=[password] [database name] >  ...

  5. linux 将debug信息重定向到LCD(屏幕)

    /*********************************************************************** * linux 将debug信息重定向到LCD(屏幕) ...

  6. 【题解】【矩阵】【回溯】【Leetcode】Unique Paths II

    A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The ...

  7. 【题解】【DP】【Leetcode】Climbing Stairs

    You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb ...

  8. WinEdt和TeXworks编辑LaTeX文件乱码问题

    WinEdt默认使用的是系统编码,windows下可以认为是 GBK编码,而TeXworks默认使用的是UTF8编码,所以要统一这两个编码,才能保证两个文件互相打开不会乱码. 具体方法如下: 一,可以 ...

  9. 基于 Qt的聊天工具

    主要参考:http://blog.csdn.net/zouxy09/article/details/9140881

  10. CUDA 程序中的同步

    前言 在并发,多线程环境下,同步是一个很重要的环节.同步即是指进程/线程之间的执行顺序约定. 本文将介绍如何通过共享内存机制实现块内多线程之间的同步. 至于块之间的同步,需要使用到 global me ...