Class SolarisCentralProcessor
java.lang.Object
oshi.hardware.common.AbstractCentralProcessor
oshi.hardware.common.platform.unix.solaris.SolarisCentralProcessor
- All Implemented Interfaces:
CentralProcessor
Abstract base for the Solaris CPU. The command-based pieces (NUMA mapping, processor-ID feature flags, the
dmesg physical-processor parsing, the averaged tick rollup, and the kstat -p context-switch/interrupt
fallbacks) are shared; the kstat-chain queries are native and implemented by the JNA and FFM subclasses.-
Nested Class Summary
Nested classes/interfaces inherited from interface CentralProcessor
CentralProcessor.LogicalProcessor, CentralProcessor.PhysicalProcessor, CentralProcessor.ProcessorCache, CentralProcessor.ProcessorIdentifier, CentralProcessor.TickTypeModifier and TypeInterfaceDescriptionstatic classA class representing a Logical Processor and its replationship to physical processors, physical packages, and logical groupings such as NUMA Nodes and Processor groups, useful for identifying processor topology.static classA class representing a Physical Processor (a core) providing per-core statistics that may vary, particularly in hybrid/modular processors.static classA class representing CPU Cache Memory.static final classA class encapsulating ghe CPU's identifier strings ,including name, vendor, stepping, model, and family information (also called the signature of a CPU)static enumIndex of CPU tick counters in theCentralProcessor.getSystemCpuLoadTicks()andCentralProcessor.getProcessorCpuLoadTicks()arrays. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringgetProcessorID(String stepping, String model, String family) Fetches the ProcessorID by encoding the stepping, model, family, and feature flags.protected Quartet<List<CentralProcessor.LogicalProcessor>, List<CentralProcessor.PhysicalProcessor>, List<CentralProcessor.ProcessorCache>, List<String>> Initializes logical and physical processor lists and feature flags.Maps each CPU id to its NUMA node (lgroup) vialgrpinfo.longGet number of context switcheslongGet number of interruptsprotected abstract List<CentralProcessor.LogicalProcessor> Enumerates the logical processors from the subclass's kstat data source.long[]Get the system CPU load ticksMethods inherited from class AbstractCentralProcessor
createProcessorID, createProcessorID, createProcListFromDmesg, getContextSwitches, getCurrentFreq, getFeatureFlags, getInterrupts, getLogicalProcessorCount, getLogicalProcessors, getMaxFreq, getPhysicalPackageCount, getPhysicalProcessorCount, getPhysicalProcessors, getProcessorCaches, getProcessorCpuLoadBetweenTicks, getProcessorCpuLoadBetweenTicks, getProcessorCpuLoadTicks, getProcessorIdentifier, getSystemCpuLoadBetweenTicks, getSystemCpuLoadBetweenTicks, getSystemCpuLoadTicks, orderedProcCaches, queryCurrentFreq, queryMaxFreq, queryProcessorCpuLoadTicks, queryProcessorId, toStringModifier and TypeMethodDescriptionprotected static StringcreateProcessorID(String stepping, String model, String family, String[] flags) Creates a Processor ID by encoding the stepping, model, family, and feature flags.protected static StringcreateProcessorID(String stepping, String model, String family, String[] flags, long hwcap) Creates a Processor ID by encoding the stepping, model, family, and feature flags.protected List<CentralProcessor.PhysicalProcessor> createProcListFromDmesg(List<CentralProcessor.LogicalProcessor> logProcs, Map<Integer, String> dmesg) Creates a list of physical processors from dmesg output.longGet the number of system-wide context switches which have occurred.long[]Attempts to return the current frequency (in Hz), of the logical processors on this CPU.Returns a list of platform-specific strings which identify CPU Feature Flags.longGet the number of system-wide interrupts which have occurred.intGet the number of logical CPUs available for processing.Returns anUnmodifiableListof the CPU's logical processors.longMaximum frequeny (in Hz), of the logical processors on this CPU.intGet the number of packages/sockets in the system.intGet the number of physical CPUs/cores available for processing.Returns anUnmodifiableListof the CPU's physical processors.Makes a best-effort attempt to identify the CPU's processor caches.double[]getProcessorCpuLoadBetweenTicks(long[][] oldTicks) Returns the "recent cpu usage" for all logical processors by counting ticks fromCentralProcessor.getProcessorCpuLoadTicks()between the user-provided value from a previous call.double[]getProcessorCpuLoadBetweenTicks(long[][] oldTicks, long[][] ticks) Returns the "recent cpu usage" for all logical processors by counting ticks fromCentralProcessor.getProcessorCpuLoadTicks()between the user-provided value from a previous call.long[][]Get Processor CPU Load tick counters.The CPU's identifier strings ,including name, vendor, stepping, model, and family information (also called the signature of a CPU).doublegetSystemCpuLoadBetweenTicks(long[] oldTicks) Returns the "recent cpu usage" for the whole system by counting ticks fromCentralProcessor.getSystemCpuLoadTicks()between the user-provided value from a previous call.doublegetSystemCpuLoadBetweenTicks(long[] oldTicks, long[] ticks) Returns the "recent cpu usage" for the whole system by counting ticks between two user-provided values, retrieved fromCentralProcessor.getSystemCpuLoadTicks()at different points in time.long[]Get System-wide CPU Load tick counters.static List<CentralProcessor.ProcessorCache> Filters a set of processor caches to an ordered listprotected abstract long[]Get processor current frequency.protected longGet processor max frequency.protected abstract long[][]Get the processor CPU load ticksprotected abstract CentralProcessor.ProcessorIdentifierUpdates logical and physical processor counts and arraystoString()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface CentralProcessor
getProcessorCpuLoad, getSystemCpuLoad, getSystemLoadAverageModifier and TypeMethodDescriptiondefault double[]getProcessorCpuLoad(long delay) This is a convenience method which collects an initial set of ticks usingCentralProcessor.getProcessorCpuLoadTicks()and passes that result toCentralProcessor.getProcessorCpuLoadBetweenTicks(long[][])after the specified delay.default doublegetSystemCpuLoad(long delay) This is a convenience method which collects an initial set of ticks usingCentralProcessor.getSystemCpuLoadTicks()and passes that result toCentralProcessor.getSystemCpuLoadBetweenTicks(long[])after the specified delay.double[]getSystemLoadAverage(int nelem) Returns the system load average for the number of elements specified, up to 3, representing 1, 5, and 15 minutes.
-
Constructor Details
-
SolarisCentralProcessor
public SolarisCentralProcessor()
-
-
Method Details
-
initProcessorCounts
protected Quartet<List<CentralProcessor.LogicalProcessor>, List<CentralProcessor.PhysicalProcessor>, List<CentralProcessor.ProcessorCache>, List<String>> initProcessorCounts()Description copied from class:AbstractCentralProcessorInitializes logical and physical processor lists and feature flags.- Specified by:
initProcessorCountsin classAbstractCentralProcessor- Returns:
- Lists of initialized Logical Processors, Physical Processors, Processor Caches, and Feature Flags.
-
querySystemCpuLoadTicks
public long[] querySystemCpuLoadTicks()Description copied from class:AbstractCentralProcessorGet the system CPU load ticks- Specified by:
querySystemCpuLoadTicksin classAbstractCentralProcessor- Returns:
- The system CPU load ticks
-
queryContextSwitches
public long queryContextSwitches()Description copied from class:AbstractCentralProcessorGet number of context switches- Specified by:
queryContextSwitchesin classAbstractCentralProcessor- Returns:
- The context switches
-
queryInterrupts
public long queryInterrupts()Description copied from class:AbstractCentralProcessorGet number of interrupts- Specified by:
queryInterruptsin classAbstractCentralProcessor- Returns:
- The interrupts
-
queryLogicalProcessors
Enumerates the logical processors from the subclass's kstat data source.- Returns:
- the logical processor list (may be empty; the caller substitutes a single default processor)
-
mapNumaNodes
-
getProcessorID
-