elasticsearch reference

Tools – head for Chrome (ElasticSearch Head – Chrome Web Store) – Postman (link) – Insomenia (link) – elasticdump – nodejs (link) Monitoring – ps_mem.py – monitor real memory utilization (github link) – ps -eo size,pid,user,command –sort -size | awk ‘{ hr=$1/1024 ; printf(“%13.2f Mb “,hr) } { for ( x=4 ; x< =NF ; […]

mysqldump script (per tables)

#!/bin/bash # This is PER TABLE backup. Each table will be backed up individually ## to enable passwordless mysqdump, put your password in /etc/mysql/[mysqld|percona|maria].conf.d/client.conf # [client] # user=”” # pass=”” THEDB=”mydbname” # THE DATABASE OUTPUT=”/home/backup/mysqldump” DATE=`date +%Y%m%d` OPTS=”–max_allowed_packet=512M ” tables=`mysql -e “use $THEDB; show tables;” | tr -d “| ” | grep -v -E “^Tables_in_” […]

Web server tuning (apache and nginx)

Key points enable http2 & change mpm prefork to event php-fpm   Enable http2 On apache + prefork to event –¬†https://techwombat.com/enable-http2-apache-ubuntu-16-04/ sudo add-apt-repository ppa:ondrej/apache2 sudo apt update sudo apt upgrade sudo apt install php7.0-fpm sudo a2enmod proxy_fcgi setenvif sudo a2enconf php7.0-fpm sudo a2dismod php7.0 sudo a2dismod mpm_prefork sudo a2enmod mpm_event sudo service apache2 restart sudo […]