Operating System - Linux
1748195 Members
2733 Online
108759 Solutions
New Discussion юеВ

redhat linux - real cpu #

 
SOLVED
Go to solution
Wilfred Chau_1
Respected Contributor

redhat linux - real cpu #

For a single HT/MP cpu system, when I cat /proc/cpuinfo, it shows 2 CPUs with the same cpu or physical id. I am just wondering if there is a smarter way to find out the # of physical CPU installed on a system.
7 REPLIES 7
Stuart Browne
Honored Contributor

Re: redhat linux - real cpu #

No, from what I can see, the output of 'cat /proc/cpuinfo | grep physical.id | sort | uniq -c' is what's gonna get you the accurate count.

The ACPI stuff doesn't see them as the same processor on a 2.6 machine..
One long-haired git at your service...
Sung Oh
Respected Contributor

Re: redhat linux - real cpu #

Hi,

You can also check interrupts file to get number of CPU count and status.

#cat /proc/interrupts

Regards,

Sung
Wilfred Chau_1
Respected Contributor

Re: redhat linux - real cpu #

This is my /proc/interrupt. What does this mean? I could have a dual CPUs system. This file may not help in that case?


CPU0 CPU1
0: 21510621 0 IO-APIC-edge timer
1: 12566 0 IO-APIC-edge i8042
8: 2 0 IO-APIC-edge rtc
9: 1 0 IO-APIC-level acpi
12: 339446 0 IO-APIC-edge i8042
14: 172248 0 IO-APIC-edge ide0
169: 1092907 0 IO-APIC-level eth0
201: 158269 0 IO-APIC-level libata
209: 0 0 IO-APIC-level uhci_hcd:usb1, ehci_hcd:usb5
217: 0 0 IO-APIC-level uhci_hcd:usb2
225: 381 0 IO-APIC-level uhci_hcd:usb3, Intel ICH6
233: 0 0 IO-APIC-level uhci_hcd:usb4
NMI: 0 0
LOC: 21510970 21511020
ERR: 0
MIS: 0
Rick Garland
Honored Contributor
Solution

Re: redhat linux - real cpu #

Try the 'lshw' script. This will provide the information and in a easily readable format.
Wilfred Chau_1
Respected Contributor

Re: redhat linux - real cpu #

Where is the lshw located? Couldn't find it from this forum too.
Wilfred Chau_1
Respected Contributor

Re: redhat linux - real cpu #

Thanks Rick. I find lshw. I personally like the lshw -short output, very hpux like.

Thank you all.
Wilfred Chau_1
Respected Contributor

Re: redhat linux - real cpu #

Thanks all.