How to identity processor architecture

prabhu prabhum at
Thu Jan 27 04:53:28 EST 2011

>>  64-bit processors  have lm ("long mode") in the flags section 
>> of cpuinfo whereas   32-bit processors have not.
>> regards
>> Dharmvir Kumar
Thanks a lot folks.

Adding more detail on this.

Below detail helps to understand CPU architecture.
*__*Finding CPU Arch*_

    $ grep flags /proc/cpuinfo | uniq | egrep -o -w "rm|tm|lm"

    Under "Flags" section in /proc/cpuinfo, you will find any of the 
flags "tm" or

    "rm" or "lm"

        * rm (Real Mode) means it is a 16 bit processor
        * tm (Transparent Mode) means it is a 32 bit processor
        * lm (Long Mode) means it is a 64 bit processor

Is this only way to find the processor architecture ????

Any C programming technique apart from using this /proc/cpuinfo detail?

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the Kernelnewbies mailing list