removed network interfaces without data traffic

This commit is contained in:
charlie
2022-02-17 01:14:40 +08:00
parent 8af9fdd1fb
commit 9000c53c0a

View File

@@ -158,7 +158,7 @@ func (s *ServerSummary) collect() {
s.HardDisk.Usage = d.UsedPercent
s.NetWork = make([]NetWorkInfo, 0)
for i, n := range nv {
if n.BytesRecv == 0 && !isNetAdapter(n.Name) {
if n.BytesRecv == 0 || !isNetAdapter(n.Name) {
continue
}
info := NetWorkInfo{}