mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fixed stats.zeek to log all data before zeek terminates rather than return too soon
This commit is contained in:
parent
4a76229209
commit
97c8912443
1 changed files with 6 additions and 5 deletions
|
@ -99,11 +99,6 @@ event check_stats(then: time, last_ns: NetStats, last_cs: ConnStats, last_ps: Pr
|
|||
local fs = get_file_analysis_stats();
|
||||
local ds = get_dns_stats();
|
||||
|
||||
if ( zeek_is_terminating() )
|
||||
# No more stats will be written or scheduled when Zeek is
|
||||
# shutting down.
|
||||
return;
|
||||
|
||||
local info: Info = [$ts=nettime,
|
||||
$peer=peer_description,
|
||||
$mem=ps$mem/1048576,
|
||||
|
@ -146,6 +141,12 @@ event check_stats(then: time, last_ns: NetStats, last_cs: ConnStats, last_ps: Pr
|
|||
}
|
||||
|
||||
Log::write(Stats::LOG, info);
|
||||
|
||||
if ( zeek_is_terminating() )
|
||||
# No more stats will be written or scheduled when Zeek is
|
||||
# shutting down.
|
||||
return;
|
||||
|
||||
schedule report_interval { check_stats(nettime, ns, cs, ps, es, rs, ts, fs, ds) };
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue