Netzwerkdaten anzeigen
This commit is contained in:
@@ -398,16 +398,17 @@ function getAllNetworkConnections()
|
||||
foreach ($networkInterfaces as $interface) {
|
||||
if ($interface->ifname != 'lo') {
|
||||
$wirelessOption = [];
|
||||
$interfaceData = json_decode(shell_exec('ip -j -s link show ' . $interface->ifname));
|
||||
|
||||
foreach ($interface->addr_info as $addr) {
|
||||
if ($addr->family == "inet")
|
||||
$ipAddress = $addr->local;
|
||||
}
|
||||
$macAddress = $interface->address;
|
||||
$bytesReceived = 0;
|
||||
$bytesSent = 0;
|
||||
$packetsReceived = 0;
|
||||
$packetsSent = 0;
|
||||
$bytesReceived = $interfaceData[0]->stats64->rx->bytes;
|
||||
$bytesSent = $interfaceData[0]->stats64->tx->bytes;
|
||||
$packetsReceived = $interfaceData[0]->stats64->rx->packets;
|
||||
$packetsSent = $interfaceData[0]->stats64->tx->packets;
|
||||
|
||||
if (substr($interface->ifname, 0, 4) == 'wlan') {
|
||||
$streamWirelessInterface = shell_exec('/sbin/iwconfig ' . $interface->ifname);
|
||||
|
||||
Reference in New Issue
Block a user