OpenLDAP shows Too many open files warning in /var/log/messages

Standard
$ tail -f /var/log/messages
Oct 29 13:18:30 slapd[14761]: warning: cannot open /etc/hosts.allow: Too many open files
Oct 29 13:18:30 slapd[14761]: warning: cannot open /etc/hosts.deny: Too many open files
Oct 29 13:18:30 slapd[14761]: warning: cannot open /etc/hosts.allow: Too many open files
Oct 29 13:18:30 slapd[14761]: warning: cannot open /etc/hosts.deny: Too many open files

By default, openLDAP can open 1024 files at the same time.

If you change SLAPD_ULIMIT_SETTINGS in /etc/sysconfig/ldap , you can solve this problem.

# vi /etc/sysconfig/ldap 
# Parameters to ulimit, use to change system limits for slapd
#SLAPD_ULIMIT_SETTINGS=""        ####ココ old
SLAPD_ULIMIT_SETTINGS="-n 2048"  ####ココ new
# service slapd restart

search linux command history by peco

Standard

Handy !!
https://github.com/peco/peco

####install peco

$ wget https://github.com/peco/peco/releases/download/v0.1.12/peco_linux_amd64.tar.gz
$ tar -zxvf peco_linux_amd64.tar.gz
$ su
$ cp peco_linux_amd64/peco /usr/local/bin/

####config peco

$ vi ~/.bash_profile

export HISTCONTROL=ignoreboth:erasedups
#export HISTIGNORE="fg*:bg*:history*:wmctrl*:exit*:ls -al:cd ~"

# settings for peco
_replace_by_history() {
    local l=$(HISTTIMEFORMAT=  history | sed -e 's/^\s*[0-9]*\s*//' | peco --query "$READLINE_LINE")
    READLINE_LINE="$l"
    READLINE_POINT=${#l}
}

bind -x '"\C-r": _replace_by_history'
bind    '"\C-xr": reverse-search-history'