glanceapp/glance · error

getting sensor readings: %v

Error message

getting sensor readings: %v

What it means

Error "getting sensor readings: %v" thrown in glanceapp/glance.

Source

Thrown at pkg/sysinfo/sysinfo.go:227

		if err == nil || errIsWarning {
			if req.CPUTempSensor != "" {
				for i := range sensorReadings {
					if sensorReadings[i].SensorKey == req.CPUTempSensor {
						info.CPU.TemperatureIsAvailable = true
						info.CPU.TemperatureC = uint8(sensorReadings[i].Temperature)
						break
					}
				}

				if !info.CPU.TemperatureIsAvailable {
					addErr(fmt.Errorf("CPU temperature sensor %s not found", req.CPUTempSensor))
				}
			} else if cpuTempSensor := inferCPUTempSensor(sensorReadings); cpuTempSensor != nil {
				info.CPU.TemperatureIsAvailable = true
				info.CPU.TemperatureC = uint8(cpuTempSensor.Temperature)
			}
		} else {
			addErr(fmt.Errorf("getting sensor readings: %v", err))
		}
	}

	addedMountpoints := map[string]struct{}{}
	addMountpointInfo := func(requestedPath string, mpReq MointpointRequest) {
		if _, exists := addedMountpoints[requestedPath]; exists {
			return
		}

		isHidden := req.HideMountpointsByDefault
		if mpReq.Hide != nil {
			isHidden = *mpReq.Hide
		}
		if isHidden {
			return
		}

		usage, err := disk.Usage(requestedPath)

View on GitHub (pinned to 91324e8de7)

Solutions

  1. Check that the platform supports sensor readings via gopsutil (temperature sensors are unsupported on Windows and the BSDs).
  2. Ensure required kernel modules for hardware monitoring are loaded (e.g. 'modprobe coretemp' or 'k10temp' on Linux).
  3. Verify the process has permission to read /sys/class/hwmon entries.

When it happens

Trigger: Occurs when reading sensor values from the hwmon sysfs entries fails, e.g. permission errors or sensors disappearing after suspend/resume.

Common situations: Running without read access to /sys/class/hwmon, on virtualized hardware, or when the kernel unloads a sensor module.


AI-assisted analysis of glanceapp/glance@91324e8de7 (2026-08-15). Data as JSON: /api/errors/fd981a442c65f6df. Report an issue: GitHub.