mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
Reporting / rrd - fix regression in 895e58ff25, missing rrd target and sysctl collection issue. partially merges https://github.com/opnsense/core/pull/8024
This commit is contained in:
parent
33fcdabdbb
commit
8e3b4b7229
@ -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 [];
|
||||
}
|
||||
|
||||
@ -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}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user