#/opt/script/patroni-stop.sh
#LastUpdate: #12:54 2020.10.22
################################################################
#cat /opt/script/patroni-stop.sh | grep LastUpdate
################################################################
#scp /opt/script/patroni-stop.sh root@srv112:/opt/script/patroni-stop.sh
#scp /opt/script/patroni-stop.sh root@srv113:/opt/script/patroni-stop.sh
#RESTART PATRONI:
#systemctl daemon-reload; sudo systemctl restart patroni; sleep 5; sudo systemctl status patroni --no-pager;
#10.0.2.111*
#10.0.2.112*
#10.0.2.113*
################################################################
#systemctl status patroni.service
#systemctl enable patroni.service
#sudo systemctl start patroni.service
#sudo systemctl status patroni.service
#################################################
#REF: https://www.cybertec-postgresql.com/en/patroni-setting-up-a-highly-available-postgresql-cluster/
sudo systemctl stop patroni
sleep 2
echo "############################################"
echo "DAEMON STATUS:"
sudo systemctl status patroni --no-pager;
echo "--------------------------------------------"
echo "PROCESS STATUS:"
ps aux| egrep "PID|py"
echo "--------------------------------------------"
echo "TCP STATUS:"
netstat -ntlup | egrep "PID|LISTEN" | egrep "PID|python|etcd|postgres|haproxy" | sort -t: -k2 -n
#THE_END
#LastUpdate: #12:54 2020.10.22
################################################################
#cat /opt/script/patroni-stop.sh | grep LastUpdate
################################################################
#scp /opt/script/patroni-stop.sh root@srv112:/opt/script/patroni-stop.sh
#scp /opt/script/patroni-stop.sh root@srv113:/opt/script/patroni-stop.sh
#RESTART PATRONI:
#systemctl daemon-reload; sudo systemctl restart patroni; sleep 5; sudo systemctl status patroni --no-pager;
#10.0.2.111*
#10.0.2.112*
#10.0.2.113*
################################################################
#systemctl status patroni.service
#systemctl enable patroni.service
#sudo systemctl start patroni.service
#sudo systemctl status patroni.service
#################################################
#REF: https://www.cybertec-postgresql.com/en/patroni-setting-up-a-highly-available-postgresql-cluster/
sudo systemctl stop patroni
sleep 2
echo "############################################"
echo "DAEMON STATUS:"
sudo systemctl status patroni --no-pager;
echo "--------------------------------------------"
echo "PROCESS STATUS:"
ps aux| egrep "PID|py"
echo "--------------------------------------------"
echo "TCP STATUS:"
netstat -ntlup | egrep "PID|LISTEN" | egrep "PID|python|etcd|postgres|haproxy" | sort -t: -k2 -n
#THE_END
No comments:
Post a Comment