From mboxrd@z Thu Jan 1 00:00:00 1970 From: hsggebhardt@googlemail.com (Henry Gebhardt) Date: Thu, 27 Jan 2011 12:15:49 +0100 Subject: How to identity processor architecture In-Reply-To: <4D414098.5010706@msys-tech.com> References: <4D410BBF.10203@msys-tech.com> <4D411359.2010905@msys-tech.com> <4D412AC3.1060003@msys-tech.com> <21BC6FAC-048B-42A7-AA7C-4A89B2D0714A@cs.ucsd.edu> <4D414098.5010706@msys-tech.com> Message-ID: <20110127111549.GA13744@bimsstein> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Thu, Jan 27, 2011 at 03:23:28PM +0530, prabhu wrote: > Any C programming technique apart from using this /proc/cpuinfo detail? What about using the machine field of uname(2): $ man 2 uname Quoting from that man page: [...] the operating system presumably knows its name, release and version. It also knows what hardware it runs on. Perhaps a downside, it returns the machine type as a string. Does that do what you want? I also find "man linux32" rather interesting: setarch - change reported architecture in new program environment and set personality flags Might be useful for testing. Greetings, Henry