mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 15:48:19 +00:00
Small cleanup to netstats script.
This commit is contained in:
parent
51b926f16a
commit
50f378a335
1 changed files with 3 additions and 6 deletions
|
@ -14,7 +14,6 @@ export {
|
||||||
}
|
}
|
||||||
|
|
||||||
global last_stat: net_stats;
|
global last_stat: net_stats;
|
||||||
global last_stat_time: time;
|
|
||||||
global have_stats = F;
|
global have_stats = F;
|
||||||
|
|
||||||
event net_stats_update(t: time, ns: net_stats)
|
event net_stats_update(t: time, ns: net_stats)
|
||||||
|
@ -29,13 +28,11 @@ event net_stats_update(t: time, ns: net_stats)
|
||||||
NOTICE([$note=DroppedPackets,
|
NOTICE([$note=DroppedPackets,
|
||||||
$msg=fmt("%d packets dropped after filtering, %d received%s",
|
$msg=fmt("%d packets dropped after filtering, %d received%s",
|
||||||
new_dropped, new_recvd + new_dropped,
|
new_dropped, new_recvd + new_dropped,
|
||||||
new_link != 0 ?
|
new_link != 0 ? fmt(", %d on link", new_link) : "")]);
|
||||||
fmt(", %d on link", new_link) : "")]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
have_stats = T;
|
have_stats = T;
|
||||||
|
|
||||||
last_stat = ns;
|
last_stat = ns;
|
||||||
last_stat_time = t;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue