zoukankan      html  css  js  c++  java
  • Linux Find If Processor / CPU is 64 bit / 32 bit ( long mode ~ lm )

    http://www.cyberciti.biz/faq/linux-how-to-find-if-processor-is-64-bit-or-not/

    Linux Find If Processor / CPU is 64 bit / 32 bit ( long mode ~ lm )

    by Vivek Gite on April 30, 2006 · 52 comments

    How do I determine if my CPU is 64bit or not under Linux operating systems?

    You need to use the uname command, which prints system information including kernel version and whether kernel is 32 bit or 64 bit. You need to run the less /proc/cpuinfo command to determine if CPU is 64 bit or not.

    Example - Find Out If Running Kernel Is 32 Or 64 Bit

    Type the following command at the terminal, run:
    $ uname -a
    Output:

    Linux ora100 2.6.5-7.252-smp #1 SMP Tue Feb 14 11:11:04 UTC 2006 x86_64 x86_64 x86_64 GNU/Linux

    x86_64 GNU/Linux indicates that you've a 64bit Linux kernel running. If you use see i386/i486/i586/i686 it is a 32 bit kernel.

    How Do I Find Out CPU is 32bit or 64bit?

    Simply type the following command and if you see lm in output, you have a 64 bit CPU based system:
    $ grep flags /proc/cpuinfo
    Output:

    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 nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
    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 nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
    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 nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
    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 nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm

    (Scroll to see all flags)

    CPU Modes:

    • lm flag means Long mode cpu - 64 bit CPU
    • Real mode 16 bit CPU
    • Protected Mode is 32-bit CPU

    See also:

    Updated for accuracy!

  • 相关阅读:
    POJ 1222 高斯消元更稳
    Maven与Eclipse使用中遇到的问题解决之道
    Java并发之任务的描述和执行
    XMemcached简单使用示例
    Java的容器类小结
    Java系统属性与Preferences API的简单介绍
    你知道自己执行的是哪个jre吗?
    Log4J配置文件详解
    Java日志工具之SLF4J
    Java日志工具之Log4J
  • 原文地址:https://www.cnblogs.com/lexus/p/2328813.html
Copyright © 2011-2022 走看看