{"record":{"id":"fd981a442c65f6df","repo":"glanceapp/glance","slug":"getting-sensor-readings-v","errorCode":null,"errorMessage":"getting sensor readings: %v","messagePattern":"getting sensor readings: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/sysinfo/sysinfo.go","lineNumber":227,"sourceCode":"\t\tif err == nil || errIsWarning {\n\t\t\tif req.CPUTempSensor != \"\" {\n\t\t\t\tfor i := range sensorReadings {\n\t\t\t\t\tif sensorReadings[i].SensorKey == req.CPUTempSensor {\n\t\t\t\t\t\tinfo.CPU.TemperatureIsAvailable = true\n\t\t\t\t\t\tinfo.CPU.TemperatureC = uint8(sensorReadings[i].Temperature)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif !info.CPU.TemperatureIsAvailable {\n\t\t\t\t\taddErr(fmt.Errorf(\"CPU temperature sensor %s not found\", req.CPUTempSensor))\n\t\t\t\t}\n\t\t\t} else if cpuTempSensor := inferCPUTempSensor(sensorReadings); cpuTempSensor != nil {\n\t\t\t\tinfo.CPU.TemperatureIsAvailable = true\n\t\t\t\tinfo.CPU.TemperatureC = uint8(cpuTempSensor.Temperature)\n\t\t\t}\n\t\t} else {\n\t\t\taddErr(fmt.Errorf(\"getting sensor readings: %v\", err))\n\t\t}\n\t}\n\n\taddedMountpoints := map[string]struct{}{}\n\taddMountpointInfo := func(requestedPath string, mpReq MointpointRequest) {\n\t\tif _, exists := addedMountpoints[requestedPath]; exists {\n\t\t\treturn\n\t\t}\n\n\t\tisHidden := req.HideMountpointsByDefault\n\t\tif mpReq.Hide != nil {\n\t\t\tisHidden = *mpReq.Hide\n\t\t}\n\t\tif isHidden {\n\t\t\treturn\n\t\t}\n\n\t\tusage, err := disk.Usage(requestedPath)","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/pkg/sysinfo/sysinfo.go#L209-L245","documentation":"Error \"getting sensor readings: %v\" thrown in glanceapp/glance.","triggerScenarios":"Occurs when reading sensor values from the hwmon sysfs entries fails, e.g. permission errors or sensors disappearing after suspend/resume.","commonSituations":"Running without read access to /sys/class/hwmon, on virtualized hardware, or when the kernel unloads a sensor module.","solutions":["Check that the platform supports sensor readings via gopsutil (temperature sensors are unsupported on Windows and the BSDs).","Ensure required kernel modules for hardware monitoring are loaded (e.g. 'modprobe coretemp' or 'k10temp' on Linux).","Verify the process has permission to read /sys/class/hwmon entries."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}