Small cleanup to netstats script.

This commit is contained in:
Seth Hall 2011-06-16 11:15:19 -04:00
parent 51b926f16a
commit 50f378a335

View file

@ -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;
} }