

You can easily read its content and display it. The result on a machine with 2 model Xeon X5650 physical processors each with 6 physical cores that also support hyperthreading: Type model name : Intel(R) Xeon(R) CPU X5650 2.67GHz The /proc/cpuinfo is a read-only file that contains information about the central processing units on a machine. To know processors information from command prompt, you can run the below command. This utility shows information about processors, system physical memory, disk drives, display monitor and BIOS etc.
#Cpuinfo commandline windows
On Windows OS, we can find hardware information using msinfo32 utility. PHYSICAL=`cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l`ĬORES=`cat /proc/cpuinfo | grep "cpu cores" | sort | uniq | cut -d':' -f2`Įcho "Including hyperthreading cores $ALL" Get CPU processor information command prompt. MODEL=`cat /cpu/procinfo | grep "model name" | sort | uniq`ĪLL=`cat /proc/cpuinfo | grep "bogo" | wc -l` Use uname The uname command is usually used to print information about your kernel. That said, you can modify the following script to get the answers that you need. If all you need to know is the architecture of your CPU, you can use the arch command: arch x8664 Keep your most frequently used commands handy with the Linux commands cheat sheet.

As someone who writes a lot of programs with thread pools, you really need to know the count of physical cores vs cores/hyperthreads. This gives a ton of information - way more that I generally ever need. Hyperthreaded (virtual) cores would not be included (at least to my mind). cat /proc/cpuinfo (Image credit: Tom's Hardware) This command will produce a lot of text, typically it will. The number of "cores" would be physical cores. Use the cat command to display the data held in /proc/cpuinfo. The number of "processors" would be the physical number installed in sockets on the machine. When someone asks for "the number of processors/cores" there are 2 answers being requested.
