Skip to content

Commit

Permalink
Module flow_age_stats and script for graphs (#231)
Browse files Browse the repository at this point in the history
Introduce new module flow_age_stats with a script for graph making 
---------

Co-authored-by: Václav Bartoš <[email protected]>
  • Loading branch information
Michalsus and vaclavbartos authored Jun 20, 2024
1 parent 1a23618 commit 1873c23
Show file tree
Hide file tree
Showing 7 changed files with 466 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ biflow_aggregator \
debug_sender \
device_classifier \
email_reporter \
flow_age_stats \
flowcounter \
flow_meter \
ipv6stats \
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ AC_CONFIG_FILES([Makefile
aggregator/Makefile
anonymizer/Makefile
backscatter/Makefile
flow_age_stats/Makefile
biflow_aggregator/Makefile
bloom_history/Makefile
debug_sender/Makefile
Expand Down
4 changes: 4 additions & 0 deletions flow_age_stats/Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
bin_PROGRAMS=flow_age_stats
flow_age_stats_SOURCES=flow_age_stats.c fields.c fields.h
flow_age_stats_LDADD=-ltrap -lunirec
include ../aminclude.am
20 changes: 20 additions & 0 deletions flow_age_stats/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Flow Age Stats module - README

## Description
This module is used for making statistics about the age of incoming flow data. The statistics produced are minimal, maximal and average values of the differences between the time a flow was received and its TIME_FIRST and TIME_LAST timestamps.

Additionally, the module can output histograms of flow age distribution. These are written as two text files (time_first.txt, time_last.txt) that each have a table of three columns. First is the max age of the flow (the end of bin range). Second is the percentage of flows that are in that age group. Third is the flow count. By default, the bins are 0-1s, 1s-10s, 10s-20s, ... 590s-600s, >600s.

## Interfaces
- Input: One UniRec interface
- Template MUST contain fields TIME_FIRST and TIME_LAST
- Output: None

## Parameters
- '-t' If specified, the module writes a file where the tables will be outputted. (Caution - the module will overwrite files labeled time_first.txt, time_last.txt)

## Graphs
This module also comes with a script that makes use of GNUplot to make graphs from the data that is outputted into files. You can see how the graph looks like below.

![ExampleGraph](example.png)

Binary file added flow_age_stats/example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 1873c23

Please sign in to comment.