From c7762bc6e87419ba8c71d7b431607393d2370e5c Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 27 Apr 2020 12:59:12 +0200 Subject: [statistics] Track CPU temperature as well --- modules-available/statistics/api.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules-available/statistics/api.inc.php') diff --git a/modules-available/statistics/api.inc.php b/modules-available/statistics/api.inc.php index b58a18f6..70811b2b 100644 --- a/modules-available/statistics/api.inc.php +++ b/modules-available/statistics/api.inc.php @@ -112,7 +112,7 @@ if ($type{0} === '~') { . ' cpumodel = :cpumodel,' . ' systemmodel = :systemmodel,' . ' id44mb = :id44mb,' - . ' live_tmpsize = 0, live_swapsize = 0, live_memsize = 0, cpuload = 255,' + . ' live_tmpsize = 0, live_swapsize = 0, live_memsize = 0, live_cpuload = 255, live_cputemp = 0,' . ' badsectors = :badsectors,' . ' data = :data,' . ' state = :state ' @@ -215,11 +215,11 @@ if ($type{0} === '~') { } } } - foreach (['memsize', 'tmpsize', 'swapsize', 'memfree', 'tmpfree', 'swapfree', 'cpuload'] as $item) { + foreach (['memsize', 'tmpsize', 'swapsize', 'memfree', 'tmpfree', 'swapfree', 'cpuload', 'cputemp'] as $item) { $liveVal = Request::post($item, false, 'int'); if ($liveVal !== false) { $strUpdateBoottime .= ' live_' . $item . ' = :_' . $item . ', '; - if ($item === 'cpuload') { + if ($item === 'cpuload' || $item === 'cputemp') { $liveVal = round($liveVal); } else { $liveVal = ceil($liveVal / 1024); -- cgit v1.2.3-55-g7522