super uz mi to jede 😀
**$util->setMenu('/queue simple');
//while (TRUE) {
foreach ($util->getAll() as $item) {
[$upload, $download] = explode('/', (string)$item->getProperty('rate'));
[$packetRateUpload, $packetRateDownload] = explode('/', (string)$item->getProperty('packet-rate'));
echo '
' . ($item->getProperty('name')) . ' <br>
download: ' . $download . ' bps (' . round((int)$download/1024/1024, 2) . ' Mbps)<br>
upload: ' . $upload . ' bps (' . round((int)$upload/1024/1024, 2) . ' Mbps)<br><br>
';
}
sleep(1);
//}**
Ale nemuzu prijit na to jak docilit aby se zobrazil pouze zaznam z nazvem "NAS"
Vyzkoušel jsem
[$util->setMenu('/queue simple');
//while (TRUE) {
foreach ($util->getAll() as $item) {
[$upload, $download] = explode('/', (string)$item->getProperty('rate'));
[$packetRateUpload, $packetRateDownload] = explode('/', (string)$item->getProperty('packet-rate'));
echo '
' . ($item->getProperty('name') === 'NAS') . ' <br>
download: ' . $download . ' bps (' . round((int)$download/1024/1024, 2) . ' Mbps)<br>
upload: ' . $upload . ' bps (' . round((int)$upload/1024/1024, 2) . ' Mbps)<br><br>
';
}
sleep(1);
//}
](url)
Ale to zobrazi 😀
download: 0 bps (0 Mbps)
upload: 0 bps (0 Mbps)
download: 0 bps (0 Mbps)
upload: 520 bps (0 Mbps)
1
download: 3992 bps (0 Mbps)
upload: 96240 bps (0.09 Mbps)
download: 272 bps (0 Mbps)
upload: 824 bps (0 Mbps)
download: 0 bps (0 Mbps)
upload: 0 bps (0 Mbps)
download: 38056 bps (0.04 Mbps)
upload: 1744 bps (0 Mbps)