Package oshi.hardware
Class CentralProcessor.ProcessorIdentifier
java.lang.Object
oshi.hardware.CentralProcessor.ProcessorIdentifier
- Enclosing interface:
- CentralProcessor
public static final class CentralProcessor.ProcessorIdentifier
extends java.lang.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 Summary
Constructors Constructor Description ProcessorIdentifier(java.lang.String cpuVendor, java.lang.String cpuName, java.lang.String cpuFamily, java.lang.String cpuModel, java.lang.String cpuStepping, java.lang.String processorID, boolean cpu64bit)
-
Method Summary
Modifier and Type Method Description java.lang.String
getFamily()
Gets the family.java.lang.String
getIdentifier()
Identifier, eg.java.lang.String
getMicroarchitecture()
Returns the processor's microarchitecture, if known.java.lang.String
getModel()
Gets the model.java.lang.String
getName()
Name, eg.java.lang.String
getProcessorID()
Gets the Processor ID.java.lang.String
getStepping()
Gets the stepping.java.lang.String
getVendor()
Processor vendor.long
getVendorFreq()
Vendor frequency (in Hz), eg.boolean
isCpu64bit()
Is CPU 64bit?java.lang.String
toString()
-
Constructor Details
-
ProcessorIdentifier
public ProcessorIdentifier(java.lang.String cpuVendor, java.lang.String cpuName, java.lang.String cpuFamily, java.lang.String cpuModel, java.lang.String cpuStepping, java.lang.String processorID, boolean cpu64bit)
-
-
Method Details
-
getVendor
public java.lang.String getVendor()Processor vendor.- Returns:
- vendor string.
-
getName
public java.lang.String getName()Name, eg. Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz- Returns:
- Processor name.
-
getFamily
public java.lang.String getFamily()Gets the family. For non-Intel/AMD processors, returns the comparable value, such as the Architecture.- Returns:
- the family
-
getModel
public java.lang.String getModel()Gets the model. For non-Intel/AMD processors, returns the comparable value, such as the Partnum.- Returns:
- the model
-
getStepping
public java.lang.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 java.lang.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 bygetIdentifier()
. 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.
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 java.lang.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 java.lang.String getMicroarchitecture()Returns the processor's microarchitecture, if known.- Returns:
- A string containing the microarchitecture if known.
Constants.UNKNOWN
otherwise.
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-