comp.org.uk

Networking | Programming | Security | Linux | Computer Science | About

Find CPU Details in Linux

If you’ve got a working Linux system, you can learn a great deal about your CPU by using three text-mode commands:

uname -a

Typing uname -a displays basic information on the kernel and the CPU. For instance, one of my systems returns x86_64 AMD Phenom (tm) II X3 700e Processor, among other things, indicating the manufacturer and model number of the CPU.

lscpu

This command returns additional information on about 20 lines of output. Much of this information is highly technical, such as the sizes of caches the CPU supports. Some of it’s less technical, such as the architecture and the number of CPUs or cores it supports.

cat /proc/cpuinfo

This command returns still more information compared to lscpu. Chances are you won’t need this information yourself, but a developer or technician might want some of this information to help debug a problem.

One thing to keep in mind is that modern x86-64 CPUs can run software compiled for the older x86 architecture. Thus, you might be running a 32-bit Linux distribution on a 64-bit CPU. The output of these commands can be confusing in such cases. For instance, here’s part of what lscpu shows on one such system:

Architecture: i686
CPU op-mode(s): 64-bit

The Architecture line suggests an x86 CPU (i686 being a specific variant of that architecture), but the CPU op-mode(s) line indicates that the CPU supports 64-bit operation. If you have trouble interpreting this output, you might be able to find something by looking up the CPU’s model on the manufacturer’s Web site; however, manufacturers tend to bury such information in hard-to-read specification sheets, so be prepared to read carefully.


Published on Fri 15 March 2002 by Craig Brown in Linux with tag(s): cpu linux