Package oshi.hardware

Class CentralProcessor.ProcessorIdentifier

java.lang.Object
oshi.hardware.CentralProcessor.ProcessorIdentifier
Enclosing interface:
CentralProcessor

@Immutable public static final class CentralProcessor.ProcessorIdentifier extends Object
A class encapsulating ghe CPU's identifier strings ,including name, vendor, stepping, model, and family information (also called the signature of a CPU)
  • Constructor Details

    • ProcessorIdentifier

      public ProcessorIdentifier(String cpuVendor, String cpuName, String cpuFamily, String cpuModel, String cpuStepping, String processorID, boolean cpu64bit)
    • ProcessorIdentifier

      public ProcessorIdentifier(String cpuVendor, String cpuName, String cpuFamily, String cpuModel, String cpuStepping, String processorID, boolean cpu64bit, long vendorFreq)
  • Method Details

    • getVendor

      public String getVendor()
      Processor vendor.
      Returns:
      vendor string.
    • getName

      public String getName()
      Name, eg. Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz
      Returns:
      Processor name.
    • getFamily

      public String getFamily()
      Gets the family. For non-Intel/AMD processors, returns the comparable value, such as the Architecture.
      Returns:
      the family
    • getModel

      public String getModel()
      Gets the model. For non-Intel/AMD processors, returns the comparable value, such as the Partnum.
      Returns:
      the model
    • getStepping

      public String getStepping()
      Gets the stepping. For non-Intel/AMD processors, returns the comparable value, such as the rnpn composite of Variant and Revision.
      Returns:
      the stepping
    • getProcessorID

      public String getProcessorID()
      Gets the Processor ID. This is a hexidecimal string representing an 8-byte value, normally obtained using the CPUID opcode with the EAX register set to 1. The first four bytes are the resulting contents of the EAX register, which is the Processor signature, represented in human-readable form by getIdentifier() . The remaining four bytes are the contents of the EDX register, containing feature flags.

      For processors that do not support the CPUID opcode this field is populated with a comparable hex string. For example, ARM Processors will fill the first 32 bytes with the MIDR. AIX PowerPC Processors will return the machine ID.

      NOTE: The order of returned bytes is platform and software dependent. Values may be in either Big Endian or Little Endian order.

      NOTE: If OSHI is unable to determine the ProcessorID from native sources, it will attempt to reconstruct one from available information in the processor identifier.

      Returns:
      A string representing the Processor ID
    • getIdentifier

      public String getIdentifier()
      Identifier, eg. x86 Family 6 Model 15 Stepping 10. For non-Intel/AMD processors, this string is populated with comparable values.
      Returns:
      Processor identifier.
    • isCpu64bit

      public boolean isCpu64bit()
      Is CPU 64bit?
      Returns:
      True if cpu is 64bit.
    • getVendorFreq

      public long getVendorFreq()
      Vendor frequency (in Hz), eg. for processor named Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz the vendor frequency is 2000000000.
      Returns:
      Processor frequency or -1 if unknown.
    • getMicroarchitecture

      public String getMicroarchitecture()
      Returns the processor's microarchitecture, if known.
      Returns:
      A string containing the microarchitecture if known. Constants.UNKNOWN otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object