네트워크 이력 인터페이스별 섹션 분리
This commit is contained in:
+6
-3
@@ -1031,8 +1031,9 @@ function network_log_interfaces(array $network): array
|
||||
}
|
||||
|
||||
foreach ((array)($network['interfaces'] ?? []) as $row) {
|
||||
if (($row['name'] ?? '') === 'br0') {
|
||||
$targets['br0'] = $row;
|
||||
$name = (string)($row['name'] ?? '');
|
||||
if (in_array($name, ['br0', 'eth1', 'wlan0', 'wlan1'], true)) {
|
||||
$targets[$name] = $row;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1148,6 +1149,8 @@ function network_usage_history(int $limit = 240): array
|
||||
iface,
|
||||
rx_mbps,
|
||||
tx_mbps,
|
||||
ROUND(rx_mbps / 8, 4) AS rx_mbytes,
|
||||
ROUND(tx_mbps / 8, 4) AS tx_mbytes,
|
||||
rx_pps,
|
||||
tx_pps
|
||||
FROM network_usage_logs
|
||||
@@ -4550,7 +4553,7 @@ function collect_snapshot(bool $applyFan = true): array
|
||||
$fanSpike = fan_spike_analysis($history, $fan, $system, $processes);
|
||||
$network = network_info();
|
||||
add_network_usage_log($network);
|
||||
$networkHistory = network_usage_history(480);
|
||||
$networkHistory = network_usage_history(1000);
|
||||
|
||||
$shouldLogNotice = !empty($fanSpike['alert_started'])
|
||||
|| (!empty($fanSpike['active']) && (bool)setting_value('notice.log_during_alert'));
|
||||
|
||||
Reference in New Issue
Block a user