This file contains 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
# First, make a backup of the cluster: | |
cp -a /etc/pve /root/pve_backup | |
# Stop cluster service: | |
/etc/init.d/pve-cluster stop | |
# Umount /etc/pve if it is mounted: | |
umount /etc/pve | |
# Stop corosync service: |
This file contains 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
#!/bin/bash | |
function die { echo "ERROR: $*"; exit 1; } | |
[ $# -lt 2 ] && die "Too few arguments" | |
KNOCKPORTS="$1" | |
shift | |
HOST="$1" | |
shift |
This file contains 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
http://jarrpa.net/2011/10/28/creating-custom-url-handlers-in-ubuntu-11-04-11-10-gnome-3-0/ |
This file contains 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
cd /etc/apt/sources.list.d/ | |
wget https://archive.cloudera.com/cm5/ubuntu/xenial/amd64/cm/cloudera.list | |
apt update | |
apt-get install oracle-j2sdk1.7 | |
cd | |
wget http://archive.cloudera.com/cm5/installer/5.14.3/cloudera-manager-installer.bin | |
chmod u+x cloudera-manager-installer.bin | |
sudo ./cloudera-manager-installer.bin |
This file contains 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
#!/bin/bash | |
BENCH_CYCLE="3" | |
IPERFTIME="120" | |
function log { echo $(date "+%Y-%m-%d %H:%M:%S") $@; } | |
function info { log INFO "$@"; } | |
function warning { log WARNING "$@"; } | |
function error { log ERROR "$@"; } | |
function fatal { log FATAL "$@"; exit 2; } |
This file contains 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
# server-iperf3.yml | |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
labels: | |
run: iperf-srv | |
name: iperf-srv | |
spec: | |
containers: | |
- args: |
This file contains 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
############################################################################### | |
# | |
# This is a standalone etcd deployment for PoC or testing purposes. It runs a | |
# single replica etcd using host networking. Data is stored in /var/etcd on the | |
# host's disk. A scheduling toleration allows it to be scheduled before the | |
# cluster is ready. A scheduling anti affinity ensures that never more than one | |
# instance is running per node. A NodePort service makes etcd avaiable on a | |
# stable address on all nodes without requiring DNS resolution to work | |
# | |
# etcd address: |
This file contains 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
#!/bin/bash | |
while true | |
do | |
echo "$(sleep 1;free -m|grep Mem:|awk '{print $3}') $(sar 1 1 | grep Average|awk '{print $3" "$4" "$5" "$6" "$7}')" >> /home/ubuntu/metrics.log | |
done |
This file contains 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
#!/bin/bash | |
COUNT=$1 | |
tail -n$COUNT /home/ubuntu/metrics.log | \ | |
awk '{M+=$1;U+=$2;N+=$3;S+=$4;I+=$5;T+=$6} END {printf "%d\t=%.2f+%.2f+%.2f+%.2f+%.2f\n",M/NR,U/NR,N/NR,S/NR,I/NR,T/NR}' |
This file contains 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
cat /proc/net/tcp| cut -c -36|grep '0A$'| cut -c 16-19| while read line; do echo $((16#$line)); done |
OlderNewer