java.lang.Object
oshi.hardware.CentralProcessor.ProcessorIdentifier
- Enclosing interface:
- CentralProcessor
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
ConstructorDescriptionProcessorIdentifier
(String cpuVendor, String cpuName, String cpuFamily, String cpuModel, String cpuStepping, String processorID, boolean cpu64bit) ProcessorIdentifier
(String cpuVendor, String cpuName, String cpuFamily, String cpuModel, String cpuStepping, String processorID, boolean cpu64bit, long vendorFreq) -
Method Summary
Modifier and TypeMethodDescriptionGets the family.Identifier, eg. x86 Family 6 Model 15 Stepping 10.Returns the processor's microarchitecture, if known.getModel()
Gets the model.getName()
Name, eg.Gets the Processor ID.Gets the stepping.Processor vendor.long
Vendor frequency (in Hz), eg. for processor named Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz the vendor frequency is 2000000000.boolean
Is CPU 64bit?toString()
-
Constructor Details
-
ProcessorIdentifier
-
ProcessorIdentifier
-
-
Method Details
-
getVendor
Processor vendor.- Returns:
- vendor string.
-
getName
Name, eg. Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz- Returns:
- Processor name.
-
getFamily
Gets the family. For non-Intel/AMD processors, returns the comparable value, such as the Architecture.- Returns:
- the family
-
getModel
Gets the model. For non-Intel/AMD processors, returns the comparable value, such as the Partnum.- Returns:
- the model
-
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
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. 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
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
Returns the processor's microarchitecture, if known.- Returns:
- A string containing the microarchitecture if known.
Constants.UNKNOWN
otherwise.
-
toString
-