mirror of
https://github.com/unraid/webgui.git
synced 2026-01-15 06:00:14 -06:00
Dashboard: fixed percentage calculation of array/cache
This commit is contained in:
@@ -69,8 +69,9 @@ foreach ($disks as $disk) {
|
||||
foreach ($devs as $disk) {
|
||||
$extra_size += $disk['sectors']*$disk['sector_size'];
|
||||
}
|
||||
$array_percent = my_scale(100*$array_used/($array_size ?: 1), $u, 1, 0);
|
||||
$cache_percent = my_scale(100*$cache_used/($cache_size ?: 1), $u, 1, 0);
|
||||
$dot = $display['number'][0];
|
||||
$array_percent = number_format(100*$array_used/($array_size ?: 1),1,$dot,'');
|
||||
$cache_percent = number_format(100*$cache_used/($cache_size ?: 1),1,$dot,'');
|
||||
|
||||
exec('cat /sys/devices/system/cpu/*/topology/thread_siblings_list|sort -nu', $cpus);
|
||||
$fans = exec("sensors -uA 2>/dev/null|grep -c 'fan[0-9]_input'");
|
||||
|
||||
Reference in New Issue
Block a user