Skip to content

Commit

Permalink
Fragmentation cache - Add parameters to service
Browse files Browse the repository at this point in the history
  • Loading branch information
BonnyAD9 authored and SiskaPavel committed Nov 7, 2023
1 parent f7c0f11 commit 650a572
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
18 changes: 15 additions & 3 deletions init/ipfixprobed
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,23 @@ if [ -e "$CONFFILE" ]; then
if [ ! -z ${ACTIVE_TIMEOUT+x} ]; then
CACHE_ACTIVET_PARAM=";active=${ACTIVE_TIMEOUT}"
fi
CACHE_INACTIVET_PARAM=""
CACHE_INACTIVE_PARAM=""
if [ ! -z ${INACTIVE_TIMEOUT+x} ]; then
CACHE_INACTIVET_PARAM=";inactive=${INACTIVE_TIMEOUT}"
CACHE_INACTIVE_PARAM=";inactive=${INACTIVE_TIMEOUT}"
fi
storage="-s cache;${CACHE_SIZE_PARAM}${CACHE_ACTIVET_PARAM}${CACHE_INACTIVET_PARAM}"
CACHE_FRAG_ENABLE_PARAM=""
if [ ! -z ${FRAG_CACHE_ENABLE+x} ]; then
CACHE_FRAG_ENABLE_PARAM=";frag-enable=${FRAG_CACHE_ENABLE}"
fi
CACHE_FRAG_SIZE=""
if [ ! -z ${FRAG_CACHE_SIZE+x} ]; then
CACHE_FRAG_SIZE=";frag-size=${FRAG_CACHE_SIZE}"
fi
CACHE_FRAG_TIMEOUT=""
if [ ! -z ${FRAG_CACHE_TIMEOUT+x} ]; then
CACHE_FRAG_TIMEOUT=";frag-timeout=${FRAG_CACHE_TIMEOUT}"
fi
storage="-s cache;${CACHE_SIZE_PARAM}${CACHE_ACTIVET_PARAM}${CACHE_INACTIVE_PARAM}${CACHE_FRAG_ENABLE_PARAM}${CACHE_FRAG_SIZE}${CACHE_FRAG_TIMEOUT}"
process=""
if `declare -p PROCESS > /dev/null 2>/dev/null`; then
# list of input plugins
Expand Down
9 changes: 9 additions & 0 deletions init/link0.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,15 @@ CACHE_SIZE=17
ACTIVE_TIMEOUT=300
INACTIVE_TIMEOUT=65

# Enable/disable fragmentation cache (true, false)
FRAG_CACHE_ENABLE=true

# size of fragmentation cache
FRAG_CACHE_SIZE=10007

# timeout in seconds for fragments in fragmentation cache
FRAG_CACHE_TIMEOUT=3

#
# $$$$$$\ $$\ $$\
# $$ __$$\ $$ | $$ |
Expand Down

0 comments on commit 650a572

Please sign in to comment.