feat: Add support for reading CPU (dev.cpu.*.temperature) and ACPI thermal zone (hw.acpi.thermal.tz*) temperature sensors on FreeBSD systems. (#2227)

Co-authored-by: roib <roib@elsec.us>
This commit is contained in:
QuantumFlux21
2026-08-16 20:58:41 -04:00
committed by GitHub
parent dbe10e3a8f
commit 9f1128933f
4 changed files with 263 additions and 1 deletions

14
agent/sensors_freebsd.go Normal file
View File

@@ -0,0 +1,14 @@
//go:build freebsd
package agent
import (
"context"
"github.com/shirou/gopsutil/v4/sensors"
"golang.org/x/sys/unix"
)
var getSensorTemps = func(ctx context.Context) ([]sensors.TemperatureStat, error) {
return getFreeBSDSensorTemps(ctx, unix.SysctlUint32)
}