postgresql show connections

SELECT * FROM pg_stat_activity;

Или запросом:
select pid as process_id, usename as username, datname as database_name, client_addr as client_address, application_name, backend_start, state, state_change from pg_stat_activity;

Обновление kubernetes 1.19

yum list --showduplicates kubeadm --disableexcludes=kubernetes | grep 1.19
yum install -y kubeadm-1.19.6-0 --disableexcludes=kubernetes
kubeadm version
kubectl drain мастернода --ignore-daemonsets
kubeadm upgrade plan
kubeadm upgrade apply v1.19.6-0
yum install -y kubelet-1.19.6-0 kubectl-1.19.6-0 --disableexcludes=kubernetes
systemctl restart kubelet

На рабочих нодах:
вместо  kubeadm upgrade plan и kubeadm upgrade apply v1.19.6-0
 kubeadm upgrade node

kubernetes информация

kubectl get nodes -o wide
kubectl get svc --all-namespaces
kubectl get pvc --all-namespaces
kubectl cluster-info dump --insecure-skip-tls-verify=true
kubectl get pods --all-namespaces
kubectl describe pod api_pod -n api-namespace
kubectl top nodes
kubectl top pods --all-namespaces

kubernetes сброс рабочей ноды

kubeadm reset
docker stop $(docker ps -aq)
docker system prune -f
docker volume rm $(docker volume ls -q)
docker image rm $(docker image ls -q)
rm -rf /etc/ceph \
       /etc/cni \
       /etc/kubernetes \
       /opt/cni \
       /opt/rke \
       /run/secrets/ \
       /run/calico \
       /run/flannel \
       /var/lib/calico \
       /var/lib/etcd \
       /var/lib/cni \
       /var/lib/kubelet \
       /var/lib/rancher/rke/log \
       /var/log/containers \
       /var/log/pods \

HP MSA – Replacing a Failed Disk Замена диска

Перейти к концу метаданных

  1. Remove the failed drive, and replace with the new one.

  2. Connect to the web cosole of the storage array. Select the MSA > Provisioning > Manage Global spares.


3. Tick the replacement drive > Modify Spares.


4. That’s it, the vdisk that HAD the failed drive will ‘claim’ the spare and rebuild, this may take a little time. After this process is finished, the vdisk will carry out a ‘Media Scub’ job.