Linux查看CPU信息详解
来源:互联网 发布:高校网络工程项目 编辑:程序博客网 时间:2024/06/06 07:12
Linux查看CPU信息
首先,大家如果看到有什么不懂的地方,欢迎吐槽!!!
我会在当天或者第二天及时回复,并且改进~~
参数说明:
- Physical id 相同表示为同一个物理CPU
- Processor 表示逻辑CPU
- Cpu cores CPU核数,内核个数
- Core id 内核id号
- Siblings 每个物理CPU里面的逻辑CPU个数
物理CPU 两个
processor 0 processor 2 processor 4 processor 6core id 0 core id 2 core id 1 core id 3physical 0 physical 0 physical 0 physical 0cpu cores 4 cpu cores 4 cpu cores 4 cpu cores 4siblings 4 siblings 4 siblings 4 siblings 4processor 1 processor 3 processor 5 processor 7core id 0 core id 2 core id 1 core id 3physical 1 physical 1 physical 1 physical 1cpu cores 4 cpu cores 4 cpu cores 4 cpu cores 4siblings 4 siblings 4 siblings 4 siblings 4
计算是否开启超线程
逻辑CPU > 物理CPU x CPU核数 #开启超线程逻辑CPU = 物理CPU x CPU核数 #没有开启超线程或不支持超线程
查看物理CPU个数
cat /proc/cpuinfo | grep “physical id” | sort -u | wc -l2
查看逻辑CPU个数
cat /proc/cpuinfo | grep “processor” | wc -l8
查看CPU内核数
cat /proc/cpuinfo | grep “cpu cores” | uniq4
查看单个物理CPU封装的逻辑CPU数量
cat /proc/cpuinfo | grep “siblings” | uniq4
script查看CPU信息
#!/bin/bashphysical=$(cat /proc/cpuinfo | grep "physical id" | sort -u | wc -l)processor=$(cat /proc/cpuinfo | grep "processor" | wc -l)cpucores=$(cat /proc/cpuinfo | grep "cpu cores" | uniq)siblings=$(cat /proc/cpuinfo | grep "siblings" | uniq)echo "* * * * * CPU Information is a : * * * * *"echo "physical id is a : $physical"echo "processor is a : $processor"echo "cpu cores is a : $cpucores"echo "siblings is a : $siblings"
判断CPU是32位的还是64位的
cat /proc/cpuinfo | grep lm 8 flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx tm2 ssse3 cx16 xtpr pdcm dca sse4_1 xsave lahf_lm dts tpr_shadow vnmi flexprioritylm 表示Long Mode - 64位CPU
判断系统是32位的还是64位的
uname -a i386 i686 代表32位操作系统X86_64 代表64位操作系统
0 0
- Linux查看CPU信息详解
- 查看CPU信息 linux
- Linux CPU 信息查看
- Linux CPU 信息查看
- Linux CPU 信息查看
- linux查看cpu信息
- linux cpu信息查看
- Linux CPU 信息查看
- linux --查看cpu信息
- Linux CPU信息查看
- linux查看CPU信息
- linux查看cpu信息
- Linux cpu信息查看
- Linux CPU 信息查看
- linux查看CPU信息
- 查看Linux cpu信息
- Linux CPU信息查看
- Linux查看CPU信息 (
- 这么多的APP,存在极限么?
- HDU 3986 Harry Potter and the Final Battle 最短路
- Xcode Server Tutorials: 3. Prebuild & Postbuild Scripts
- 地纬 棠棣 你离我有多远
- UVA_11624_Fire!
- Linux查看CPU信息详解
- UIView的一些常用属性
- 搭建wnmp开发环境
- 两种高性能I/O设计模式(Reactor/Proactor)的比较
- windows下 搭建 wxWidgets 开发环境
- 《深度学习的艺术:知乎采铜自选集》读书笔记
- Android使用pull方法解析XML文件
- ObjC 记录_by jiang_ss 20150902
- jquery 选择 取消 checkbox