system: separate core and thread count

Some people find it confusing that "cores" references threads.
This commit is contained in:
Franco Fichtner 2022-01-18 12:10:06 +01:00
parent 494733dbd5
commit 2fdaab1552
2 changed files with 3 additions and 2 deletions

View File

@ -58,8 +58,9 @@ function system_api_cpu_stats()
}
// cpu model and count
$cpustats['model'] = get_single_sysctl("hw.model");
$cpustats['model'] = get_single_sysctl('hw.model');
$cpustats['cpus'] = get_single_sysctl('kern.smp.cpus');
$cpustats['cores'] = get_single_sysctl('kern.smp.cores');
// cpu frequency
$tmp = get_single_sysctl('dev.cpu.0.freq_levels');

View File

@ -75,7 +75,7 @@ require_once("system.inc");
$("#system_information_widget_firmware").html(data['firmware']);
$("#system_information_widget_cpu_type").html(data['cpu']['model'] + ' ('+data['cpu']['cpus']+' cores)');
$("#system_information_widget_cpu_type").html(data['cpu']['model'] + ' ('+data['cpu']['cores']+' cores, '+data['cpu']['cpus']+' threads)');
var uptime_days = parseInt(moment.duration(parseInt(data['uptime']), 'seconds').asDays());
var uptime_str = "";
if (uptime_days > 0) {