Skip to content

Get processor ids of multiple physical CPUs #430

Closed

Description

@atealxt

Hi,

We have Linux server which have two physical CPUs, how to get processor ids of both two?

CentralProcessor.getProcessorID() is returning a wrong value, I read the source code looks the value is generated by createProcessorID.
I manual run dmidecode -t system it didn't contain Processor Information, but dmidecode -t processor does:

Handle 0x0094, DMI type 4, 48 bytes
Processor Information
	Socket Designation: SOCKET 0
	Type: Central Processor
	Family: Xeon
	Manufacturer: Intel
	ID: XX XX XX XX XX XX XX XX
	...

Handle 0x0098, DMI type 4, 48 bytes
Processor Information
	Socket Designation: SOCKET 1
	Type: Central Processor
	Family: Xeon
	Manufacturer: Intel
	ID: XX XX XX XX XX XX XX XX
	...

Thanks!

Activity

  1. added
    new feature
    confirmed bug
    and removed
    new feature
    on Apr 14, 2018
  2. dbwiddis commented on Apr 18, 2018

    @dbwiddis
    Member

    Hi, @atealxt . Sorry for the delay in working on this.

    You correctly pointed out that we used the wrong dmidecode type for this query. It should be 4 (processor) rather than 1 (system). (Plus root permissions.) That will be fixed in #480 in less than a minute.

    As for the multiple physical CPUs, I'm going to say no on that temporarily.

    I would expect in most cases where there are two physical cpu packages, they likely share the same processor id (which simply encodes the stepping, model, family, and flags). Since you've obfuscated your CPUIDs I can't tell whether your two processors had different IDs.

    That said, #418 requests data that must be per-package or per-core and it's entirely reasonable to include (possibly different) processor IDs when that's implemented. So I'll make a note on that Issue and track the multi-package implementation there. Note that probably will be part of a 4.0.0 rewrite which is at some undetermined pointe in the future, so if you want it earlier you'll have to get involved to help. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions