mirror of
https://github.com/unraid/webgui.git
synced 2026-01-05 17:20:04 -06:00
Remove test code
This commit is contained in:
@@ -95,7 +95,6 @@ foreach ($devs as $disk) {
|
||||
|
||||
$array_percent = number_format(100*$array_used/($array_size ?: 1),1,$dot,'');
|
||||
$cpus=get_cpu_packages();
|
||||
$cpus[] = ["16,17"];
|
||||
$wg_up = $wireguard ? exec("wg show interfaces") : '';
|
||||
$wg_up = $wg_up ? explode(' ',$wg_up) : [];
|
||||
$up = count($wg_up);
|
||||
@@ -1456,7 +1455,6 @@ var recall = null;
|
||||
var recover = null;
|
||||
var tempunit="<?=_var($display,'unit','C');?>";
|
||||
|
||||
|
||||
// Helper function to calculate millisPerPixel based on container width
|
||||
function getMillisPerPixel(timeInSeconds, containerId) {
|
||||
var container = document.getElementById(containerId);
|
||||
|
||||
22
emhttp/plugins/dynamix/include/cpulist.php
Normal file
22
emhttp/plugins/dynamix/include/cpulist.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
function get_cpu_packages(string $separator = ','): array {
|
||||
$packages = [];
|
||||
|
||||
foreach (glob("/sys/devices/system/cpu/cpu[0-9]*/topology/thread_siblings_list") as $path) {
|
||||
$pkg_id = (int)file_get_contents(dirname($path) . "/physical_package_id");
|
||||
$siblings = str_replace(",", $separator, trim(file_get_contents($path)));
|
||||
|
||||
if (!in_array($siblings, $packages[$pkg_id] ?? [])) {
|
||||
$packages[$pkg_id][] = $siblings;
|
||||
}
|
||||
}
|
||||
|
||||
// Sort groups within each package by first CPU number
|
||||
foreach ($packages as &$list) {
|
||||
$keys = array_map(fn($s) => (int)explode($separator, $s)[0], $list);
|
||||
array_multisort($keys, SORT_ASC, SORT_NUMERIC, $list);
|
||||
}
|
||||
unset($list);
|
||||
|
||||
return $packages;
|
||||
}
|
||||
Reference in New Issue
Block a user