Class OpenBsdCentralProcessor

java.lang.Object
oshi.hardware.common.AbstractCentralProcessor
oshi.hardware.platform.unix.openbsd.OpenBsdCentralProcessor
All Implemented Interfaces:
oshi.hardware.CentralProcessor

@ThreadSafe public class OpenBsdCentralProcessor extends oshi.hardware.common.AbstractCentralProcessor
OpenBSD Central Processor implementation
  • Nested Class Summary

    Nested classes/interfaces inherited from interface oshi.hardware.CentralProcessor

    oshi.hardware.CentralProcessor.LogicalProcessor, oshi.hardware.CentralProcessor.PhysicalProcessor, oshi.hardware.CentralProcessor.ProcessorCache, oshi.hardware.CentralProcessor.ProcessorIdentifier, oshi.hardware.CentralProcessor.TickType
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Returns the system load average for the number of elements specified, up to 3, representing 1, 5, and 15 minutes.
    protected oshi.util.tuples.Quartet<List<oshi.hardware.CentralProcessor.LogicalProcessor>, List<oshi.hardware.CentralProcessor.PhysicalProcessor>, List<oshi.hardware.CentralProcessor.ProcessorCache>, List<String>>
     
    protected long
    Get number of context switches
    protected long[]
     
    protected long
    Get number of interrupts
    protected long[][]
    Get the processor CPU load ticks
    protected oshi.hardware.CentralProcessor.ProcessorIdentifier
     
    protected long[]
    Get the system CPU load ticks

    Methods inherited from class oshi.hardware.common.AbstractCentralProcessor

    createProcessorID, createProcessorID, createProcListFromDmesg, getContextSwitches, getCurrentFreq, getFeatureFlags, getInterrupts, getLogicalProcessorCount, getLogicalProcessors, getMaxFreq, getPhysicalPackageCount, getPhysicalProcessorCount, getPhysicalProcessors, getProcessorCaches, getProcessorCpuLoadBetweenTicks, getProcessorCpuLoadBetweenTicks, getProcessorCpuLoadTicks, getProcessorIdentifier, getSystemCpuLoadBetweenTicks, getSystemCpuLoadBetweenTicks, getSystemCpuLoadTicks, orderedProcCaches, queryMaxFreq, toString

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface oshi.hardware.CentralProcessor

    getProcessorCpuLoad, getSystemCpuLoad
  • Constructor Details

    • OpenBsdCentralProcessor

      public OpenBsdCentralProcessor()
  • Method Details

    • queryProcessorId

      protected oshi.hardware.CentralProcessor.ProcessorIdentifier queryProcessorId()
      Specified by:
      queryProcessorId in class oshi.hardware.common.AbstractCentralProcessor
    • queryCurrentFreq

      protected long[] queryCurrentFreq()
      Specified by:
      queryCurrentFreq in class oshi.hardware.common.AbstractCentralProcessor
    • initProcessorCounts

      protected oshi.util.tuples.Quartet<List<oshi.hardware.CentralProcessor.LogicalProcessor>, List<oshi.hardware.CentralProcessor.PhysicalProcessor>, List<oshi.hardware.CentralProcessor.ProcessorCache>, List<String>> initProcessorCounts()
      Specified by:
      initProcessorCounts in class oshi.hardware.common.AbstractCentralProcessor
    • queryContextSwitches

      protected long queryContextSwitches()
      Get number of context switches
      Specified by:
      queryContextSwitches in class oshi.hardware.common.AbstractCentralProcessor
      Returns:
      The context switches
    • queryInterrupts

      protected long queryInterrupts()
      Get number of interrupts
      Specified by:
      queryInterrupts in class oshi.hardware.common.AbstractCentralProcessor
      Returns:
      The interrupts
    • querySystemCpuLoadTicks

      protected long[] querySystemCpuLoadTicks()
      Get the system CPU load ticks
      Specified by:
      querySystemCpuLoadTicks in class oshi.hardware.common.AbstractCentralProcessor
      Returns:
      The system CPU load ticks
    • queryProcessorCpuLoadTicks

      protected long[][] queryProcessorCpuLoadTicks()
      Get the processor CPU load ticks
      Specified by:
      queryProcessorCpuLoadTicks in class oshi.hardware.common.AbstractCentralProcessor
      Returns:
      The processor CPU load ticks
    • getSystemLoadAverage

      public double[] getSystemLoadAverage(int nelem)
      Returns the system load average for the number of elements specified, up to 3, representing 1, 5, and 15 minutes. The system load average is the sum of the number of runnable entities queued to the available processors and the number of runnable entities running on the available processors averaged over a period of time. The way in which the load average is calculated is operating system specific but is typically a damped time-dependent average. If the load average is not available, a negative value is returned. This method is designed to provide a hint about the system load and may be queried frequently.

      The load average may be unavailable on some platforms (e.g., Windows) where it is expensive to implement this method.

      Parameters:
      nelem - Number of elements to return.
      Returns:
      an array of the system load averages for 1, 5, and 15 minutes with the size of the array specified by nelem; or negative values if not available.