Artificial intelligent assistant

Memory consumption Fail2Ban CentOS Fail2Ban is using a huge amount of memory on my system (1.2 GB). There are several articles which describe how to reduce it. Below is an example for Debian. * append the 1ulimit1 command to `/etc/default/fail2ban` file. * Add (to the file) on last line: ulimit -s 256 Unfortunately there is no such file or directory on CentOS 7. How to apply this on my system? * * * After some tips my Systemd file for Fail2Ban is [Unit] Description=Fail2ban Service [Service] Type=forking ExecStart=/usr/bin/fail2ban-client -x start ExecStop=/usr/bin/fail2ban-client stop ExecReload=/usr/bin/fail2ban-client reload PIDFile=/var/run/fail2ban/fail2ban.pid Restart=always LimitSTACK=256` Unfortunately the result is still 1251888 KB.

The solution was to edit /etc/init.d/fail2ban.

This is the start script:


start() {
echo -n $"Starting fail2ban: "
ulimit -s 256
${FAIL2BAN} -x start > /dev/null
RETVAL=$?
if [ $RETVAL = 0 ]; then
touch ${lockfile}
echo_success
else
echo_failure
fi
echo
return $RETVAL
}


Unfortunately it's only saving me 50 mb

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 557f3adcc9726a64cd31326ab5d206da