How to check your machine's Processor Architecture

How to check your machine's processor architecture and Operating System on a linux host

You can check your linux host computer processor is 32-bit or 64-bit and whether your Operating System is 32 or 64 bit. A 32 bit processor can only address 2^32 = 4,294,967,296 of RAM or 4 GB RAM.

There are various ways you can find this information in linux as given below.

(1) Here is one line c program that finds your machine's architecture. 
#include
int main(void)
{
   printf("%d\n", _WORDSIZE);
   return 0;
}
It compiles on gcc compiler, (gcc wordsize.c) see below in screenshot. You can run the compiled executable a.out as shown in the  first screenshot, its output is 64. 

(2) Unix command uname -p, gives the machine architecture type or the cpu type. 

(3) getconf command provides what is the bit version of the Operating System, e.g 32-bit or 64 bit 

(4) lscpu command provides both, the Architecture as well as CPU modes as shown below. lscpu command gives a full listing of all the cpu parameters, the first two, Architecture and CPU op-mode(s) provide the Processor architecture and capability of CPU support for 32/64 bit instructions.

See below commands that were run on Red Hat Linux machine.



lscpu command gives a full listing of all the cpu parameters, as shown above. Its output shows two lines - the first line provides what the current "Architecture" of the machine is, and the second line is the "CPU op-mode(s)", provides the capability of CPU support for 32 and 64 bit instructions.

uname command and options
uname command output   {-s kernnel name, -n node name, -r kernel-release, -m machine hardware name, -p processor type, -i hardware-platform, -o Operating System}. See output of all commands below (on a RHEL host)
uname command























Refer the Redhat website for Common Administrative commands


Comments

Popular posts from this blog

VMware fix for Invalid manifest and ova file import failed errors

SOAPUI - import certificate

Session Timeout in Oracle Access Manager