Skip to content

Commit

Permalink
Added the ability to specify active/inactive timeout in init config
Browse files Browse the repository at this point in the history
  • Loading branch information
hynekkar committed Dec 14, 2021
1 parent 22fc6ae commit b405575
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 9 additions & 2 deletions init/ipfixprobed
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ if [ -e "$CONFFILE" ]; then
if [ ! -z ${CACHE_SIZE+x} ]; then
CACHE_SIZE_PARAM="size=${CACHE_SIZE}"
fi
storage="-s cache;${CACHE_SIZE_PARAM}"
CACHE_ACTIVET_PARAM=""
if [ ! -z ${ACTIVE_TIMEOUT+x} ]; then
CACHE_ACTIVET_PARAM=";active=${ACTIVE_TIMEOUT}"
fi
CACHE_INACTIVET_PARAM=""
if [ ! -z ${INACTIVE_TIMEOUT+x} ]; then
CACHE_INACTIVET_PARAM=";inactive=${INACTIVE_TIMEOUT}"
fi
storage="-s cache;${CACHE_SIZE_PARAM}${CACHE_ACTIVET_PARAM}${CACHE_INACTIVET_PARAM}"
process=""
if `declare -p PROCESS > /dev/null 2>/dev/null`; then
# list of input plugins
Expand All @@ -34,4 +42,3 @@ else
echo "Configuration file '$CONFFILE' does not exist, exitting." >&2
exit 1
fi

4 changes: 4 additions & 0 deletions init/link0.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ UDP=yes

# Size of flow cache, exponent to the power of two
CACHE_SIZE=17

# Active and inactive timeout in seconds (double)
ACTIVE_TIMEOUT=300.0
INACTIVE_TIMEOUT=65.0

0 comments on commit b405575

Please sign in to comment.