20

I am new to the world of Linux and Ubuntu. I want say get maximum information about CPU. (cpufreq , no. of cores, no. of threads per core, instruction set, size of caches, instruction set, virtualization etc.)

I would prefer a method which works on all Linux distributions over Ubuntu specific approaches.

lscpu seems to give only few info, I especially miss the model name here:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                4
On-line CPU(s) list:   0-3
Thread(s) per core:    2
Core(s) per socket:    2
Socket(s):             1
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 69
Stepping:              1
CPU MHz:               989.531
BogoMIPS:              4788.74
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              3072K
NUMA node0 CPU(s):     0-3

Running sudo lscpu returns same.

foxtrot9
  • 557
  • 6
    You can do cat /proc/cpuinfo. – edwinksl Aug 03 '16 at 11:34
  • Err… But, everything you listed is being shown by lscpu. So what information do you need additionally? – Hi-Angel Aug 03 '16 at 11:51
  • @Hi-Angel , it doesn't show CPU chip info i.e.: i7 or i5 and model number. – foxtrot9 Aug 03 '16 at 12:08
  • @foxtrot9 But lscpu on my machine does show the model number. I am not sure why yours doesn't. – edwinksl Aug 03 '16 at 12:11
  • @foxtrot9 what does show lscpu | grep "Model name" ? – Hi-Angel Aug 03 '16 at 12:13
  • I have already added result of lscpu at this question. – foxtrot9 Aug 03 '16 at 12:14
  • @Hi-Angel , nothings shows up for lscpu | grep "Model name" . – foxtrot9 Aug 03 '16 at 12:15
  • 3
    You could also try sudo lshw -c cpu – Byte Commander Aug 03 '16 at 12:16
  • None of these command says anything about maximum possible frequency for that particular cpu. – foxtrot9 Aug 03 '16 at 12:20
  • @foxtrot9 does anything change if you run the command with elevated privileges, i.e. sudo lscpu | grep "Model name" – Hi-Angel Aug 03 '16 at 12:20
  • @Hi-Angel , I tried that before I responded to you about same. Nothing extra for sudo lscpu | grep "Model name" – foxtrot9 Aug 03 '16 at 12:22
  • Oh, wow, I figured out what's the problem with lscpu. Right now I have a terminal chrooted into Archlinux, and I was running lscpu there, and I saw both model number and frequencies (current, max, min). But I just ran the same command in host Ubuntu 14.04, and I doesn't see those either. So, turns out the problem is that you have util-linux package too old. On the chrooted system, where I see that, I have 2.28-1 version. – Hi-Angel Aug 03 '16 at 12:33
  • Well mine one returns everything about my cpu even the model name . not sure whats happening with you.I am in arch linux though. So there might be some problem with your installation or your pc is unable to correctly identify your processor. – hellozee Aug 03 '16 at 12:38
  • @KuntalMajumder , you have new package as mentioned by Hi-Angel in above comment. – foxtrot9 Aug 03 '16 at 12:42
  • oops! I havent noticed that , there were a few more comments, sorry! – hellozee Aug 03 '16 at 12:43

1 Answers1

28

You can check the model no by executing

cat /proc/cpuinfo | grep 'model name' | uniq

Output:

 model name      : Intel(R) Xeon(R) CPU E5-2680 v2 @ 2.80GHz

To Count number of CPUs:

cat /proc/cpuinfo | grep processor

Output :

2

To check the number of cores !

cat /proc/cpuinfo | grep 'core id'
core id         : 0
core id         : 1

$hardinfo | less


$nproc  / prints out the number of processing units

For Windows Users Use CPU-Z here

For more info described for both windows and linux here.

Ramesh Chand
  • 7,274
  • 4
  • 33
  • 37