SELECT
schemaname||'.'||tablename AS full_tname,
pg_size_pretty(pg_total_relation_size(schemaname||'.'||tablename)) AS total_usage,
pg_size_pretty((pg_total_relation_size(schemaname||'.'||tablename) - pg_relation_size(schemaname||'.'||tablename))) AS external_table_usage
FROM pg_catalog.pg_tables
ORDER BY pg_total_relation_size(schemaname||'.'||tablename) DESC;ETCDCTL_API=3 etcdctl --endpoints=https://172.27.10.136:2379,https://172.27.10.137:2379,https://172.27.10.138:2379 --cacert /etc/kubernetes/pki/etcd/ca.crt --cert /etc/kubernetes/pki/etcd/peer.crt --key /etc/kubernetes/pki/etcd/peer.ke
y endpoint status -w table
+----------------------------+------------------+---------+---------+-----------+-----------+------------+
| ENDPOINT | ID | VERSION | DB SIZE | IS LEADER | RAFT TERM | RAFT INDEX |
+----------------------------+------------------+---------+---------+-----------+-----------+------------+
| https://172.27.10.136:2379 | fd6543c20e28d267 | 3.3.10 | 4.5 MB | true | 3983 | 3041667 |
| https://172.27.10.137:2379 | 9d230288279f239e | 3.3.10 | 4.4 MB | false | 3983 | 3041667 |
| https://172.27.10.138:2379 | 50d8b1b2d2933be | 3.3.10 | 4.4 MB | false | 3983 | 3041666 |
kubeadm upgrade plan 1.16.0 --config kubeadm-config.yaml
kubeadm upgrade apply -y 1.16.0 --config kubeadm-config.yaml --ignore-preflight-errors=all --force
Вывод команды
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew tap sambadevi/powerlevel9k | |
| brew install powerlevel9k | |
| echo "source /usr/local/opt/powerlevel9k/powerlevel9k.zsh-theme" >> ~/.zshrc | |
| https://github.com/powerline/fonts/blob/master/SourceCodePro/Source%20Code%20Pro%20for%20Powerline.otf |
https://juju.is/docs/azure-cloud
https://juju.is/docs/advanced-azure-cloud#heading--manually-adding-azure-credentials
juju bootstrap azure/westeurope azure-controller
juju controllers
juju kill-controller azure-controller
juju destroy-controller azure-controller
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sqlplus system/oracle <<+EOF | |
| DECLARE | |
| CURSOR get_session IS SELECT sid,serial# FROM v\$session WHERE username = 'FASTGATE'; | |
| BEGIN | |
| FOR loop_session IN get_session | |
| LOOP | |
| dbms_output.Put_line(loop_session.sid); | |
| dbms_output.Put_line(loop_session.serial#); | |
| EXECUTE IMMEDIATE 'alter system kill session ''' || loop_session.sid || ',' || loop_session.serial# || ''''; | |
| END LOOP; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| juju bootstrap maas maas-controller | |
| juju build | |
| juju deploy /tmp/charm-builds/wordpress --constraints mem=2G | |
| juju upgrade-charm wordpress --path /tmp/charm-builds/wordpress | |
| juju deploy mysql --series xenial --constraints mem=2G | |
| juju add-relation wordpress mysql | |
| watch -c juju status --color |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| file: ~/.bashrc | |
| . /etc/bash_completion.d/ssh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "Version": "2012-10-17", | |
| "Statement": [ | |
| { | |
| "Sid": "VisualEditor0", | |
| "Effect": "Allow", | |
| "Action": [ | |
| "s3:ListMultipartUploadParts", | |
| "s3:PutObject", | |
| "s3:GetObject", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| h=() | |
| if [[ -r ~/.ssh/config ]]; then | |
| h=($h ${${${(@M)${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*}) | |
| fi | |
| if [[ -r ~/.ssh/known_hosts ]]; then | |
| h=($h ${${${(f)"$(cat ~/.ssh/known_hosts{,2} || true)"}%%\ *}%%,*}) 2>/dev/null | |
| fi | |
| if [[ $#h -gt 0 ]]; then | |
| zstyle ':completion:*:ssh:*' hosts $h | |
| zstyle ':completion:*:slogin:*' hosts $h |