Menu="Dashboard" --- '.ucfirst($share['security']).''; } function data_devices($disk) { return $disk['type']=='Data'; } function cache_devices($disk) { return $disk['type']=='Cache'; } $dockerd = pgrep('dockerd'); $libvirtd = pgrep('libvirtd'); $started = $var['fsState']=='Started'; $array_size = $array_used = 0; $cache_size = $cache_used = 0; $extra_size = $extra_used = 0; $cache_type = 'disk'; foreach ($disks as $disk) { switch ($disk['type']) { case 'Data': if (isset($disk['fsFree'])) { $array_size += $disk['fsSize']; $array_used += $disk['fsSize']-$disk['fsFree']; } break; case 'Cache': if ($disk['name']=='cache') { $cache_size = $disk['fsSize']; $cache_used = $disk['fsSize']-$disk['fsFree']; $cache_type = $disk['rotational'] ? ($disk['luksState'] ? 'disk-encrypted' : 'disk') : 'nvme'; } break; } } foreach ($devs as $disk) { $extra_size += $disk['sectors']*$disk['sector_size']; } $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'"); $group = $var['shareSMBEnabled']=='yes' | $var['shareAFPEnabled']=='yes' | $var['shareNFSEnabled']=='yes'; $url = "/webGui/include/DashUpdate.php"; $names = []; $cache_only = $encrypted = 0; foreach ($shares as $share) { $names[] = $share['name']; if ($share['useCache']=='only') $cache_only++; if ($share['luksStatus']) $encrypted++; } $names = implode(',',$names); $passwd = $nopass = 0; foreach ($users as $user) if ($user['passwd']=='yes') $passwd++; else $nopass++; $boot = "/boot/config/plugins/dynamix"; $myfile = "case-model.cfg"; $mycase = file_exists("$boot/$myfile") ? file_get_contents("$boot/$myfile") : false; $board = dmidecode('Base Board Information','2',0); $serial = "s/n: {$board['Serial Number']}"; $board = "{$board['Manufacturer']} {$board['Product Name']} - v{$board['Version']}"; $bios = dmidecode('BIOS Information','0',0); $biosdate = "BIOS dated: ".my_time(strtotime($bios['Release Date']),$display['date']); $bios = "{$bios['Vendor']} - v{$bios['Version']}"; $cpu = dmidecode('Processor Information','4',0); $cpumodel = str_ireplace(["Processor","(C)","(R)","(TM)"],["","©","®","™"],$cpu['Version']); $cpumodel .= (strpos($cpumodel,'@')!==false ? "" : " @ {$cpu['Current Speed']}"); $total = exec("awk '/^MemTotal/{print $2*1024}' /proc/meminfo"); exec("ls /sys/class/net|grep -Po '^(lo|(bond|eth)\d+)$'",$ports); $sizes = ['MB','GB','TB']; $memory_type = $ecc = ''; $memory_installed = $memory_maximum = 0; $memory_devices = dmidecode('Memory Device','17'); foreach ($memory_devices as $device) { if ($device['Type']=='Unknown') continue; list($size, $unit) = explode(' ',$device['Size']); $base = array_search($unit,$sizes); if ($base!==false) $memory_installed += $size*pow(1024,$base); if (!$memory_type) $memory_type = $device['Type']; } $memory_array = dmidecode('Physical Memory Array','16'); foreach ($memory_array as $device) { list($size, $unit) = explode(' ',$device['Maximum Capacity']); $base = array_search($unit,$sizes); if ($base>=1) $memory_maximum += $size*pow(1024,$base); if (!$ecc && $device['Error Correction Type']!='None') $ecc = "{$device['Error Correction Type']} "; } if ($memory_installed >= 1024) { $memory_installed = round($memory_installed/1024); $memory_maximum = round($memory_maximum/1024); $unit = 'GiB'; } else $unit = 'MiB'; // If maximum < installed then roundup maximum to the next power of 2 size of installed. E.g. 6 -> 8 or 12 -> 16 $low = $memory_maximum < $memory_installed; if ($low) $memory_maximum = pow(2,ceil(log($memory_installed)/log(2))); ?>
"; if ($cpu2) echo ""; else echo ""; echo ""; } ?> "; } $c = 0; foreach ($ports as $port) { $last = ($port=='lo')?' last':''; echo ""; $c += 2; } $c = 0; foreach ($ports as $port) { echo ""; $c += 2; } ?> 0) { echo ""; echo ""; for ($f=0; $f<$fans; $f+=2) { if ($f+1<$fans) echo ""; else echo ""; } echo ""; }?>
Motherboard


Processor
Load: 0%

CPU $cpu1 - HT $cpu20%
0%
CPU $cpu10%
Memory
Utilization: 0%

Interface
Inbound: ---Outbound: ---

$port
Airflow
Fan count: $fans

$share) { $i++; $list = truncate($name,20); if ($share['luksStatus']>0) $list = "$list"; elseif ($share['useCache']=='only') $list = "$list"; $comment = truncate($share['comment'],40); $security = export_settings($var['shareSMBEnabled'], $sec[$name]); echo ""; } if (!count($shares)) echo ""; ?> $share) { $list = truncate($name,20); if ($share['luksStatus']>0) $list = "$list"; elseif ($share['useCache']=='only') $list = "$list"; $comment = truncate($share['comment'],40); $security = export_settings($var['shareAFPEnabled'], $sec_afp[$name]); echo ""; } if (!count($shares)) echo ""; ?> $share) { $list = truncate($name,20); if ($share['luksStatus']>0) $list = "$list"; elseif ($share['useCache']=='only') $list = "$list"; $comment = truncate($share['comment'],40); $security = export_settings($var['shareNFSEnabled'], $sec_nfs[$name]); echo ""; } if (!count($shares)) echo ""; ?> $share) { $list = truncate($name,20); if ($share['luksStatus']>0) $list = "$list"; elseif ($share['useCache']=='only') $list = "$list"; $comment = truncate($share['comment'],40); echo ""; } if (!count($shares)) echo ""; ?>$list"; echo ""; } ?>$list"; echo ""; } ?>$list"; echo ""; } ?>$list"; echo ""; } ?>
Docker Containers
Virtual Machines
Shares Share count: with cache only and encrypted
$list$comment--
No shares present
UsersUser count: with unprotected
$list$desc--
Parity
Array not started used of ( %)
Cache not started used of ( %)
Extra