LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   get CPU Id number in linux (https://www.linuxquestions.org/questions/linux-hardware-18/get-cpu-id-number-in-linux-932990/)

heavytull 03-06-2012 04:43 AM

get CPU Id number in linux
 
Is there any mean in linux to get the CPU ID?
I mean, for example there are several Intel pentium 4 models, all identified by a unique number e.g. 620, 630, 631, 640, 641, 650, 651, 660.
If one tries cpuz in windows he will get this info straight forward whereas /proc/cpuinfo in linux does not contain it.

Before posting this question I searched in previous posts on linuwquestions.org and I have surprisingly found very few posts related and all left unanswered.

hi2arun 03-06-2012 05:19 AM

Did ya try
Quote:

dmidecode -t 4

zhjim 03-06-2012 05:56 AM

Hm not sure if thats the number you were looking for but here

Code:

processor      : 3
vendor_id      : GenuineIntel
cpu family      : 6
model          : 15
model name      : Intel(R) Xeon(R) CPU          E5345  @ 2.33GHz
.. cut rest ..

It's an E5345. An information that dmidecode did not give

Code:

Processor Information
        Socket Designation: CPU 1
        Type: Central Processor
        Family: Xeon
        Manufacturer: GenuineIntel
        ID: FB 06 00 00 01 03 00 00
        Signature: Type 0, Family 6, Model 15, Stepping 11
        Flags:
                FPU (Floating-point unit on-chip)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
        Version: Intel Xeon
        Voltage: 1.2 V
        External Clock: 266 MHz
        Max Speed: 3733 MHz
        Current Speed: 2333 MHz
        Status: Populated, Enabled
        Upgrade: ZIF Socket
        L1 Cache Handle: 0x000A
        L2 Cache Handle: 0x000B
        L3 Cache Handle: Not Provided
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified


heavytull 03-06-2012 05:56 AM

Quote:

Originally Posted by hi2arun (Post 4619753)
Did ya try

You suggestion does not give the info I'm seeking.
But have you tried it yourself on your computer before?

heavytull 03-06-2012 06:04 AM

Quote:

Originally Posted by zhjim (Post 4619782)
Hm not sure if thats the number you were looking for but here

Code:

processor      : 3
vendor_id      : GenuineIntel
cpu family      : 6
model          : 15
model name      : Intel(R) Xeon(R) CPU          E5345  @ 2.33GHz
.. cut rest ..


Yes E5345 seems to be the identification code I'm trying to get.
is it an extract of your /proc/cpuinfo? have you patched something?

hi2arun 03-06-2012 06:13 AM

Quote:

Originally Posted by heavytull (Post 4619783)
You suggestion does not give the info I'm seeking.
But have you tried it yourself on your computer before?

Read the output of 'dmidecode -t 4' carefully. Grep for 'Version'

Code:

/usr/sbin/dmidecode -t 4 | grep Version

heavytull 03-06-2012 06:55 AM

Code:

# dmidecode -t 4 | grep -i "version"
        Version: Intel(R) Pentium(R) 4


cascade9 03-06-2012 07:25 AM

dmidecode -t 4 | grep -i version (without the quotes). Not that it seems to make any difference here.

Lshw will show you the model number, and you can also get the model number from the BIOS with most boards.

Quote:

Originally Posted by heavytull (Post 4619741)
I mean, for example there are several Intel pentium 4 models, all identified by a unique number e.g. 620, 630, 631, 640, 641, 650, 651, 660.
If one tries cpuz in windows he will get this info straight forward whereas /proc/cpuinfo in linux does not contain it.

Not all Pentium 4 models had a XXX number.

Early P4s (400MHz FSB, 256k cache) used X.XGHz (eg Pentium 4 1.6GHz). Later P4s (400/533 FSB, 512kcache) used X.XGHz, with addional letters for models that had already been used (eg, Pentium 4 1.6A).

XXX model number P4s didnt appear until later, when hyperthreading, 800MHz FSB and 1MB/2MB cache models were released (and even some of them had the original X.X model number, eg Pentium 4 HT 3.0).

heavytull 03-06-2012 09:23 AM

Quote:

Originally Posted by cascade9 (Post 4619850)
dmidecode -t 4 | grep -i version (without the quotes). Not that it seems to make any difference here.

with or without quotes doesn't make any difference here since there is no special character which would need to be escaped such as a blank space in the grepped for pattern.
Code:

# dmidecode -t 4 | grep -i version 
        Version: Intel(R) Pentium(R) 4


cascade9 03-06-2012 09:30 AM

You've probably got an early model P4. That would explain the 'Intel Pentium 4' version.

I'd check lshw and see what it tells you about your CPU.

heavytull 03-06-2012 11:00 AM

Quote:

Originally Posted by cascade9 (Post 4619954)
You've probably got an early model P4. That would explain the 'Intel Pentium 4' version.

I'd check lshw and see what it tells you about your CPU.

Seems good...
here is the output of lshw concerning cpu info.
-cpu
description: CPU
product: Intel(R) Pentium(R) 4 CPU 3.20GHz
vendor: Intel Corp.
physical id: 4
bus info: cpu@0
version: 15.2.9
slot: PGA 478
size: 3200MHz
capacity: 3733MHz
width: 32 bits
clock: 200MHz
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts a
cpi mmx fxsr sse sse2 ss ht tm pbe pebs bts cid xtpr
configuration: id=0

cascade9 03-06-2012 11:20 AM

Probably you have a Pentium 4 HT 3.2 (800MHz FSB, 512k cache) or Pentium 4 HT 3.2E (800MHz FSB, 1024k cache)

http://ark.intel.com/products/27501/...he-800-MHz-FSB
http://ark.intel.com/products/27502/...he-800-MHz-FSB

If you run lshw from su/sudo, you get more information, like the cache.

"Capacity: 3733MHz" seems wrong, AFAIK there isnt a single P4 with a max clock speed of 3.733GHz. Still, lshw tends to produce odd results like that sometimes.

BTW, there is also 'lshw-gtk' which runs in a window.

heavytull 03-06-2012 01:24 PM

Quote:

Originally Posted by cascade9 (Post 4620017)
Probably you have a Pentium 4 HT 3.2 (800MHz FSB, 512k cache) or Pentium 4 HT 3.2E (800MHz FSB, 1024k cache)

http://ark.intel.com/products/27501/...he-800-MHz-FSB
http://ark.intel.com/products/27502/...he-800-MHz-FSB

If you run lshw from su/sudo, you get more information, like the cache.

"Capacity: 3733MHz" seems wrong, AFAIK there isnt a single P4 with a max clock speed of 3.733GHz. Still, lshw tends to produce odd results like that sometimes.

BTW, there is also 'lshw-gtk' which runs in a window.

Code:

# lshw | grep cache
        *-cache:0       
            description: L1 cache
        *-cache:1
            description: L2 cache

# cat /proc/cpuinfo | grep -i "cache"
cache size      : 512 KB
cache_alignment : 128
cache size      : 512 KB
cache_alignment : 128



All times are GMT -5. The time now is 01:38 AM.