Skip to content

Commit 2f39ee6

Browse files
authored
Merge pull request #50 from CESNET/config_timeouts
Added the ability to specify active/inactive timeout in init config
2 parents 22fc6ae + b405575 commit 2f39ee6

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

init/ipfixprobed

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,15 @@ if [ -e "$CONFFILE" ]; then
1515
if [ ! -z ${CACHE_SIZE+x} ]; then
1616
CACHE_SIZE_PARAM="size=${CACHE_SIZE}"
1717
fi
18-
storage="-s cache;${CACHE_SIZE_PARAM}"
18+
CACHE_ACTIVET_PARAM=""
19+
if [ ! -z ${ACTIVE_TIMEOUT+x} ]; then
20+
CACHE_ACTIVET_PARAM=";active=${ACTIVE_TIMEOUT}"
21+
fi
22+
CACHE_INACTIVET_PARAM=""
23+
if [ ! -z ${INACTIVE_TIMEOUT+x} ]; then
24+
CACHE_INACTIVET_PARAM=";inactive=${INACTIVE_TIMEOUT}"
25+
fi
26+
storage="-s cache;${CACHE_SIZE_PARAM}${CACHE_ACTIVET_PARAM}${CACHE_INACTIVET_PARAM}"
1927
process=""
2028
if `declare -p PROCESS > /dev/null 2>/dev/null`; then
2129
# list of input plugins
@@ -34,4 +42,3 @@ else
3442
echo "Configuration file '$CONFFILE' does not exist, exitting." >&2
3543
exit 1
3644
fi
37-

init/link0.conf.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,7 @@ UDP=yes
3030

3131
# Size of flow cache, exponent to the power of two
3232
CACHE_SIZE=17
33+
34+
# Active and inactive timeout in seconds (double)
35+
ACTIVE_TIMEOUT=300.0
36+
INACTIVE_TIMEOUT=65.0

0 commit comments

Comments
 (0)