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
#!/usr/bin/env python3 | |
import json | |
import sys | |
# not support list partition type | |
# only support default Btree index, no other index types tested | |
# only gb* latin1 utf8mb3 utf8mb4 | |
char_collate = { | |
248:["gb18030","gb18030_chinese_ci"],249:["gb18030","gb18030_bin"],250:["gb18030","gb18030_unicode_520_ci"],24:["gb2312","gb2312_chinese_ci"],86:["gb2312","gb2312_bin"],28:["gbk","gbk_chinese_ci"],87:["gbk","gbk_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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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 <<EOF > /etc/yum.repos.d/fedora.repo | |
[warning:fedora] | |
name=fedora | |
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-23&arch=$basearch | |
enabled=1 | |
EOF | |
yum -y update gcc gcc-c++ |
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
{ | |
"Name":"tpcc1-ali-jd", | |
"Failover":false, | |
"Orders":[], | |
"Type":"synchronous", | |
"Tasks":[ | |
{ | |
"Type":"Src", | |
"NodeId":"90f3cd4d-7997-7b1b-cd99-e2c4d05c69e1", | |
"Config":{ |
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 | |
# chkconfig: 345 99 30 | |
# description: ndb_mgmd start/stop script | |
### BEGIN INIT INFO | |
# Provides: ndb_mgmd start/stop | |
# Required-Start: $local_fs $network $remote_fs | |
# Required-Stop: $local_fs $network $remote_fs | |
# Default-Start: 3 4 5 |
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 | |
# chkconfig: 345 60 40 | |
# description: datanode start/stop script | |
### BEGIN INIT INFO | |
# Provides: datanode | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 3 4 5 |
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 | |
MYSQLCONN="mysql -uroot -pxxxx" | |
old_db_name="fff" | |
new_db_name="sj" | |
$MYSQLCONN -e "CREATE DATABASE $new_db_name" | |
params=$($MYSQLCONN -N -e "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='$old_db_name'") | |
for name in $params; do | |
$MYSQLCONN -e "RENAME TABLE $old_db_name.$name to $new_db_name.$name"; | |
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
#!/usr/bin/env bash | |
function GetPID #User #Name | |
{ | |
PsUser=$1 | |
PsName=$2 | |
pid=`ps -u $PsUser|grep $PsName|grep -v grep|grep -v vi|grep -v dbx \ | |
|grep -v tail|grep -v start|grep -v stop |sed -n 1p |awk '{print $1}'` | |
echo $pid | |
} |
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 | |
#description : start realserver | |
VIP=172.16.6.8 | |
/etc/init.d/functions | |
case "$1" in | |
start) | |
/sbin/ifconfig lo:0 $VIP broadcast $VIP netmask 255.255.255.255 up | |
/sbin/route add -host $SNS_VIP dev lo:0 | |
echo "1" >/proc/sys/net/ipv4/conf/lo/arp_ignore | |
echo "2" >/proc/sys/net/ipv4/conf/lo/arp_announce |
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/sh | |
# Any Failing Command Will Cause The Script To Stop | |
set -e | |
# Treat Unset Variables As Errors | |
set -u | |
NAGIOS_VERSION=3.5.0 | |
PLUGIN_VERSION=1.4.16 |
NewerOlder