Skip to content

Instantly share code, notes, and snippets.

Avatar

ConoHa ConoHa

View GitHub Profile
View setup_minecraft_backup.sh
#!/bin/bash
set -eu
readonly ARCHIVER_DIR_PREFIX="${HOME}/.minecraft_archiver"
readonly ARCHIVER_BIN_DIR="${ARCHIVER_DIR_PREFIX}/bin"
readonly ARCHIVER_WORK_DIR="${ARCHIVER_DIR_PREFIX}/work"
readonly SYSTEMD_UNIT_DIR="/usr/lib/systemd/system/"
yum -y update
View verdown_to_previous.sh
#!/bin/bash
set -eu
readonly MINECRAFT_DIR="/opt/minecraft_server"
readonly MINECRAFT_SERVICE="/etc/systemd/system/minecraft-server.service"
readonly backup_dir=$(ls ${MINECRAFT_DIR}/backup | sort -r | head -n 1)
if [ -z ${backup_dir} -o -e ${backup_dir} ]; then
echo "Error: Backup directory not found."
View verup_to_latest.sh
#!/bin/bash
set -eu
yum install -y jq
readonly MINECRAFT_DIR="/opt/minecraft_server"
readonly BACKUP_DIR_PREFIX="backup"
readonly MINECRAFT_SERVER_SERVICE="/etc/systemd/system/minecraft-server.service"
View verdown_to_1.13.0.sh
#!/bin/bash
set -eu
readonly MINECRAFT_DIR="/opt/minecraft_server"
readonly MINECRAFT_SERVICE="/etc/systemd/system/minecraft-server.service"
readonly MINECRAFT_OLD_VERSION="1.13.0"
readonly backup_dir=$(ls ${MINECRAFT_DIR}/backup | grep ${MINECRAFT_OLD_VERSION} | sort -r | head -n 1)
View update_to_1.13.1.sh
#!/bin/bash
set -eu
readonly MINECRAFT_DIR="/opt/minecraft_server"
readonly MINECRAFT_SERVER_OLD_VER="1.13.0"
readonly MINECRAFT_SERVER_NEW_VER="1.13.1"
readonly BACKUP_DIR_PREFIX="backup"
readonly BACKUP_DIR="${MINECRAFT_SERVER_OLD_VER}-$(date --iso-8601='minutes')"
readonly MINECRAFT_SERVER_SERVICE="/etc/systemd/system/minecraft-server.service"
View verdown_to_112_from_113.sh
#!/bin/bash
set -eu
readonly MINECRAFT_DIR="/opt/minecraft_server"
readonly MINECRAFT_SERVICE="/etc/systemd/system/minecraft-server.service"
systemctl disable --now minecraft-server
rm -rf ${MINECRAFT_DIR}/[^backup]*
View update_to_113.sh
#!/bin/bash
set -eu
readonly MINECRAFT_DIR="/opt/minecraft_server/"
readonly MINECRAFT_SERVER_OLD_VER="1.12.2"
readonly MINECRAFT_SERVER_NEW_VER="1.13.0"
readonly BACKUP_DIR_PREFIX="backup"
readonly BACKUP_DIR="${MINECRAFT_SERVER_OLD_VER}-$(date --iso-8601='minutes')"
readonly MINECRAFT_SERVER_SERVICE="/etc/systemd/system/minecraft-server.service"
@ConoHa
ConoHa / gist:acfb398018ddcb8a392c
Created Sep 14, 2015
初期状態WordPressのベンチマーク
View gist:acfb398018ddcb8a392c
# wrk -c 30 -t 1 -d 30s --latency http://[VPSのIPアドレス]/
Running 30s test @ http://[VPSのIPアドレス]/
1 threads and 30 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 443.95ms 27.24ms 583.89ms 76.11%
Req/Sec 68.49 24.07 210.00 81.85%
Latency Distribution
50% 441.40ms
75% 456.87ms
90% 475.32ms
@ConoHa
ConoHa / gist:920408e3fb5316d86f71
Created Sep 14, 2015
VPS1台のベンチマーク
View gist:920408e3fb5316d86f71
# wrk -c 30 -t 1 -d 30s --latency http://[VPSのIPアドレス]/
Running 30s test @ http://[VPSのIPアドレス]/
1 threads and 30 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 797.40ms 96.29ms 1.12s 63.04%
Req/Sec 38.20 18.69 110.00 73.45%
Latency Distribution
50% 778.11ms
75% 871.41ms
90% 946.57ms
@ConoHa
ConoHa / gist:462432f58ff34ae9e49a
Created Sep 14, 2015
ロードバランサーベンチマーク(1)
View gist:462432f58ff34ae9e49a
同時接続数10
# wrk -c 10 -t 5 -d 1m --latency http://[ロードバランサーのVIP]/
Running 1m test @ http://[ロードバランサーのVIP]/
5 threads and 10 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 105.06ms 16.29ms 160.44ms 63.61%
Req/Sec 19.11 4.82 40.00 77.04%
Latency Distribution