mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
(netflow/parse) time....
This commit is contained in:
parent
f23e3ff6ff
commit
0c358e0d74
@ -93,14 +93,14 @@ def parse_flow(recv_stamp):
|
||||
flow_record = dict()
|
||||
if flow.has_field(flowd.FIELD_RECV_TIME):
|
||||
# receive timestamp
|
||||
flow_record['recv'] = flow.recv_sec + flow.recv_usec / 1000.0
|
||||
flow_record['recv'] = flow.recv_sec
|
||||
if flow_record['recv'] <= recv_stamp:
|
||||
# do not parse next flow archive (oldest reached)
|
||||
parse_done = True
|
||||
continue
|
||||
if flow.has_field(flowd.FIELD_FLOW_TIMES):
|
||||
# calculate flow start, end, duration in ms
|
||||
flow_record['flow_end'] = (flow.recv_sec - flow.flow_finish / 1000.0 + flow.sys_uptime_ms/1000.0)
|
||||
flow_record['flow_end'] = flow.recv_sec - (flow.sys_uptime_ms - flow.flow_finish) / 1000.0
|
||||
flow_record['duration_ms'] = (flow.flow_finish - flow.flow_start)
|
||||
flow_record['flow_start'] = flow_record['flow_end'] - flow_record['duration_ms'] / 1000.0
|
||||
# handle source data
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user