Package io.deephaven.process
Class SystemCpuOshi
java.lang.Object
io.deephaven.process.SystemCpuOshi
- All Implemented Interfaces:
PropertySet
The Central Processing Unit (CPU) or the processor is the portion of a computer system that carries out the
instructions of a computer program, and is the primary element carrying out the computer's functions.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.properties.PropertySet
PropertySet.PropertiesImpl, PropertySet.StringListImpl, PropertySet.StringMapImpl
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SystemCpuOshi
from
(oshi.hardware.CentralProcessor centralProcessor) abstract String
abstract int
Get the number of logical CPUs available for processing.abstract String
getModel()
abstract String
getName()
Name, eg.abstract int
Get the number of packages/sockets in the system.abstract int
Get the number of physical CPUs/cores available for processing.abstract String
Gets the Processor ID.abstract String
abstract String
Processor vendor.abstract OptionalLong
Vendor frequency (in Hz), eg.abstract boolean
is64bit()
Is CPU 64bit?final void
traverse
(PropertyVisitor visitor) Traverse this property set and output the property key/values to the given visitor.
-
Constructor Details
-
SystemCpuOshi
public SystemCpuOshi()
-
-
Method Details
-
getVendor
Processor vendor.- Returns:
- vendor string.
-
getName
Name, eg. Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz- Returns:
- Processor name.
-
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, if known
-
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. The remaining four bytes are the contents of the EDX register, containing feature flags.NOTE: The order of returned bytes is platform and software dependent. Values may be in either Big Endian or Little Endian order.
- Returns:
- A string representing the Processor ID
-
getStepping
- Returns:
- the stepping
-
getModel
- Returns:
- the model
-
getFamily
- Returns:
- the family
-
getLogicalProcessorCount
@Parameter public abstract int getLogicalProcessorCount()Get the number of logical CPUs available for processing. This value may be higher than physical CPUs if hyperthreading is enabled.- Returns:
- The number of logical CPUs available.
-
getPhysicalProcessorCount
@Parameter public abstract int getPhysicalProcessorCount()Get the number of physical CPUs/cores available for processing.- Returns:
- The number of physical CPUs available.
-
getPhysicalPackageCount
@Parameter public abstract int getPhysicalPackageCount()Get the number of packages/sockets in the system. A single package may contain multiple cores.- Returns:
- The number of physical packages available.
-
is64bit
@Parameter public abstract boolean is64bit()Is CPU 64bit?- Returns:
- True if cpu is 64bit.
-
traverse
Description copied from interface:PropertySet
Traverse this property set and output the property key/values to the given visitor.Callers should typically prefer to call
PropertyVisitor.visitProperties(PropertySet)
, as the inversion of logic allows the visitor (the more stateful object) to potentially perform initialization logic and traverse more efficiently.- Specified by:
traverse
in interfacePropertySet
- Parameters:
visitor
- the visitor- See Also:
-
from
-