mirror of
https://github.com/unraid/webgui.git
synced 2026-01-15 06:00:14 -06:00
Nchan implementation
This commit is contained in:
@@ -19,21 +19,21 @@ $data = [];
|
||||
require_once "$docroot/webGui/include/Helpers.php";
|
||||
require_once "$docroot/webGui/include/publish.php";
|
||||
|
||||
exec("ls $net|grep -Po '^(lo|(bond|eth)\d+)$'",$ports);
|
||||
|
||||
// satisfy translations (not used)
|
||||
if (!function_exists('_')) {
|
||||
function _($text) {return $text;}
|
||||
}
|
||||
|
||||
$time0 = $time = microtime(true);
|
||||
exec("ls $net|grep -Po '^(lo|(bond|eth)\d+)$'",$ports);
|
||||
foreach ($ports as $port) {
|
||||
$data[$port]['rx'] = (float)file_get_contents("$net/$port/statistics/rx_bytes");
|
||||
$data[$port]['tx'] = (float)file_get_contents("$net/$port/statistics/tx_bytes");
|
||||
}
|
||||
while (true) {
|
||||
$echo = $mode = $rxtx = $stat = [];
|
||||
$ports = $echo = $mode = $rxtx = $stat = [];
|
||||
$ts = $time - $time0;
|
||||
exec("ls $net|grep -Po '^(lo|(bond|eth)\d+)$'",$ports);
|
||||
foreach ($ports as $port) {
|
||||
// inbound + outbound speed
|
||||
$rx = (float)file_get_contents("$net/$port/statistics/rx_bytes");
|
||||
|
||||
Reference in New Issue
Block a user