Commit 0c358e0d authored by Ad Schellevis's avatar Ad Schellevis

(netflow/parse) time....

parent f23e3ff6
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment