建站公司论坛,德州整站优化,室内设计效果图怎么做出来的,东莞专业网站设计建站公司为什么80%的码农都做不了架构师#xff1f; 基于不同指令集#xff08;ISA#xff09;的CPU产生的/proc/cpuinfo文件不一样#xff0c;基于X86指令集CPU的/proc/cpuinfo文件包含如下内容#xff1a; processor #xff1a; 0vendor_id #xff1a;… 为什么80%的码农都做不了架构师 基于不同指令集ISA的CPU产生的/proc/cpuinfo文件不一样基于X86指令集CPU的/proc/cpuinfo文件包含如下内容 processor 0vendor_id GenuineIntelcpu family 6model 26model name Intel(R) Xeon(R) CPU E5520 2.27GHzstepping 5cpu MHz 1600.000cache size 8192 KBphysical id 0siblings 8core id 0cpu cores 4apicid 0fpu yesfpu_exception yescpuid level 11wp yesflags 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 syscall nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr popcnt lahf_lmbogomips 4522.12clflush size 64cache_alignment 64address sizes 40 bits physical, 48 bits virtualpower management 以上输出项的含义如下 processor 系统中逻辑处理核的编号。对于单核处理器则课认为是其CPU编号对于多核处理器则可以是物理核、或者使用超线程技术虚拟的逻辑核vendor_id CPU制造商 cpu family CPU产品系列代号model CPU属于其系列中的哪一代的代号model nameCPU属于的名字及其编号、标称主频stepping CPU属于制作更新版本cpu MHz CPU的实际使用主频cache size CPU二级缓存大小physical id 单个CPU的标号siblings 单个CPU逻辑物理核数core id 当前物理核在其所处CPU中的编号这个编号不一定连续cpu cores 该逻辑核所处CPU的物理核数apicid 用来区分不同逻辑核的编号系统中每个逻辑核的此编号必然不同此编号不一定连续fpu 是否具有浮点运算单元Floating Point Unitfpu_exception 是否支持浮点计算异常cpuid level 执行cpuid指令前eax寄存器中的值根据不同的值cpuid指令会返回不同的内容wp 表明当前CPU是否在内核态支持对用户空间的写保护Write Protectionflags 当前CPU支持的功能bogomips 在系统内核启动时粗略测算的CPU速度Million Instructions Per Secondclflush size 每次刷新缓存的大小单位cache_alignment 缓存地址对齐单位address sizes 可访问地址空间位数power management 对能源管理的支持有以下几个可选支持功能 ts temperature sensor fid frequency id control vid voltage id control ttp thermal trip tm stc 100mhzsteps hwpstate CPU信息中flags各项含义 fpu Onboard (x87) Floating Point Unitvme Virtual Mode Extensionde Debugging Extensionspse Page Size Extensionstsc Time Stamp Counter: support for RDTSC and WRTSC instructionsmsr Model-Specific Registerspae Physical Address Extensions: ability to access 64GB of memory; only 4GB can be accessed at a time thoughmce Machine Check Architecturecx8 CMPXCHG8 instructionapic Onboard Advanced Programmable Interrupt Controllersep Sysenter/Sysexit Instructions; SYSENTER is used for jumps to kernel memory during system calls, and SYSEXIT is used for jumps back to the user codemtrr Memory Type Range Registerspge Page Global Enablemca Machine Check Architecturecmov CMOV instructionpat Page Attribute Tablepse36 36-bit Page Size Extensions: allows to map 4 MB pages into the first 64GB RAM, used with PSE.pn Processor Serial-Number; only available on Pentium 3clflush CLFLUSH instructiondtes Debug Trace Storeacpi ACPI via MSRmmx MultiMedia Extensionfxsr FXSAVE and FXSTOR instructionssse Streaming SIMD Extensions. Single instruction multiple data. Lets you do a bunch of the same operation on different pieces of input in a single clock tick.sse2 Streaming SIMD Extensions-2. More of the same.selfsnoop CPU self snoopacc Automatic Clock ControlIA64 IA-64 processor Itanium.ht HyperThreading. Introduces an imaginary second processor that doesn’t do much but lets you run threads in the same process a bit quicker.nx No Execute bit. Prevents arbitrary code running via buffer overflows.pni Prescott New Instructions aka. SSE3vmx Intel Vanderpool hardware virtualization technologysvm AMD “Pacifica” hardware virtualization technologylm “Long Mode,” which means the chip supports the AMD64 instruction settm “Thermal Monitor” Thermal throttling with IDLE instructions. Usually hardware controlled in response to CPU temperature.tm2 “Thermal Monitor 2″ Decrease speed by reducing multipler and vcore.est “Enhanced SpeedStep” 根据以上内容我们则可以很方便的知道当前系统关于CPU、CPU的核数、CPU是否启用超线程等信息。 查询系统具有多少个逻辑核cat /proc/cpuinfo | grep processor | wc -l 查询系统CPU的物理核数cat /proc/cpuinfo | grep cpu cores | uniq 查询系统CPU是否启用超线程cat /proc/cpuinfo | grep -e cpu cores -e siblings | sort | uniq 输出举例 cpu cores : 6 siblings : 6 如果cpu cores数量和siblings数量一致则没有启用超线程否则超线程被启用。 查询系统CPU的个数cat /proc/cpuinfo | grep physical id | sort | uniq | wc -l 查询系统CPU是否支持某项功能则根以上类似输出结果进行sort uniq和grep就可以得到结果。 转载于:https://my.oschina.net/5lei/blog/189812