Class LhmSensor

java.lang.Object
oshi.driver.windows.wmi.LhmSensor

@ThreadSafe public final class LhmSensor extends Object
Utility to query LibreHardwareMonitor WMI sensor data for GPU metrics.

LHM publishes sensor data to ROOT\LibreHardwareMonitor when it is running. This class queries the Sensor table filtered by hardware parent identifier and sensor type.

  • Method Details

    • querySensors

      public static WbemcliUtil.WmiResult<LhmSensor.LhmSensorProperty> querySensors(String parent, String sensorType)
      Queries all sensors of a given type belonging to a specific hardware parent.
      Parameters:
      parent - the LHM hardware identifier (e.g. /gpu-nvidia/0)
      sensorType - the sensor type string (e.g. "Load", "SmallData")
      Returns:
      WMI result containing NAME, VALUE, and PARENT columns
    • queryGpuHardware

      public static WbemcliUtil.WmiResult<LhmSensor.LhmHardwareProperty> queryGpuHardware()
      Queries all GPU hardware entries from LHM to discover parent identifiers.
      Returns:
      WMI result with IDENTIFIER and NAME columns for all GPU hardware entries