Only show main ports in dashboard and system info

This commit is contained in:
bergware
2016-05-22 15:06:31 +02:00
parent df8ed55b9b
commit ed8357b67d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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");