diff --git a/src/opnsense/scripts/health/library/OPNsense/RRD/Stats/Temperature.php b/src/opnsense/scripts/health/library/OPNsense/RRD/Stats/Temperature.php index 059d9a165..950078d6f 100755 --- a/src/opnsense/scripts/health/library/OPNsense/RRD/Stats/Temperature.php +++ b/src/opnsense/scripts/health/library/OPNsense/RRD/Stats/Temperature.php @@ -33,10 +33,10 @@ class Temperature extends Base public function run() { $data = $this->shellCmd( - '/sbin/sysctl -n dev.cpu.0.temperature hw.acpi.thermal.tz0.temperature hw.temperature.CPU' + '/sbin/sysctl -ni dev.cpu.0.temperature hw.acpi.thermal.tz0.temperature hw.temperature.CPU' ); if (!empty($data)) { - return [$data[0]]; + return [preg_replace('/[^0-9,.]/', '', $data[0])]; } return []; } diff --git a/src/opnsense/scripts/health/library/OPNsense/RRD/Types/Temperature.php b/src/opnsense/scripts/health/library/OPNsense/RRD/Types/Temperature.php index ebdceb929..4f8b8c6be 100755 --- a/src/opnsense/scripts/health/library/OPNsense/RRD/Types/Temperature.php +++ b/src/opnsense/scripts/health/library/OPNsense/RRD/Types/Temperature.php @@ -36,6 +36,7 @@ class Temperature extends Base protected int $ds_heartbeat = 120; protected int $ds_min = -273; protected int $ds_max = 5000; + protected static string $stdfilename = 'system-cputemp.rrd'; /** * {@inheritdoc}