<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<blockquote cite="mid:21BC6FAC-048B-42A7-AA7C-4A89B2D0714A@cs.ucsd.edu"
 type="cite">
  <blockquote type="cite">&nbsp;64-bit processors&nbsp; have&nbsp;<span
 style="font-family: monospace;">lm</span>&nbsp;("long mode") in the&nbsp;<span
 style="font-family: monospace;">flags</span>&nbsp;section of&nbsp;<span
 style="font-family: monospace;">cpuinfo</span>&nbsp;whereas&nbsp;&nbsp; 32-bit
processors have not.<br>
regards<br>
Dharmvir Kumar<br>
  </blockquote>
</blockquote>
<small>Thanks a lot folks.<br>
<br>
Adding more detail on this.<br>
<br>
Below detail helps to understand CPU architecture.<br>
</small><font color="#000066"><u><b><br>
</b></u><small><u><b>Finding CPU Arch</b></u><br>
<br>
&nbsp;&nbsp;&nbsp; $ grep flags /proc/cpuinfo | uniq | egrep -o -w "rm|tm|lm"<br>
<br>
&nbsp;&nbsp;&nbsp; Under &#8220;Flags&#8221; section in /proc/cpuinfo, you will find any of the
flags &#8220;tm&#8221; or<br>
<br>
&nbsp;&nbsp;&nbsp; &#8220;rm&#8221; or &#8220;lm&#8221;<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * rm (Real Mode) means it is a 16 bit processor<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * tm (Transparent Mode) means it is a 32 bit processor<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * lm (Long Mode) means it is a 64 bit processor</small><br>
</font><br>
<small><br>
Is this only way to find the processor architecture ???? <br>
<br>
Any C programming technique apart from using this /proc/cpuinfo detail?<br>
<br>
Thanks,<br>
Prabhu</small><br>
</body>
</html>