mirror of
https://github.com/unraid/webgui.git
synced 2026-05-13 07:40:25 -05:00
Only show main ports in dashboard and system info
This commit is contained in:
@@ -26,7 +26,7 @@ foreach ($shares as $share) {
|
||||
}
|
||||
|
||||
$total = exec("awk '/^MemTotal/{print $2*1024/1.048576}' /proc/meminfo");
|
||||
exec("ifconfig -s|awk '/^(bond|eth|lo)/{print $1}'",$ports);
|
||||
exec("ls /sys/class/net|grep -Po '^(lo|(bond|eth)\d+)$'",$ports);
|
||||
|
||||
$memory_installed = exec("dmidecode -t 17 | awk -F: '/^\tSize: [0-9]+ MB$/{t+=$2} /^\tSize: [0-9]+ GB$/{t+=$2*1024} END{print t}'")/1024;
|
||||
$memory_maximum = exec("dmidecode -t 16 | awk -F: '/^\tMaximum Capacity: [0-9]+ GB$/{t+=$2} END{print t}'");
|
||||
|
||||
@@ -154,7 +154,7 @@ echo "$memory_installed GB (max. installable capacity $memory_maximum GB)$star";
|
||||
</div>
|
||||
<div><span style="width:90px; display:inline-block"><strong>Network:</strong></span>
|
||||
<?
|
||||
exec("ifconfig -s|grep -Po '^(bond|eth)\d+'",$sPorts);
|
||||
exec("ls /sys/class/net|grep -Po '^(bond|eth)\d+$'",$sPorts);
|
||||
$i = 0;
|
||||
foreach ($sPorts as $port) {
|
||||
$mtu = file_get_contents("/sys/class/net/$port/mtu");
|
||||
|
||||
Reference in New Issue
Block a user