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
1. 建立DB节点 | |
(其中2台为master,另一台为slave); | |
以master1作为主库 | |
master1特殊配置: | |
# custom | |
server-id = 1001 | |
log_bin = mysql-bin | |
log_bin_index = mysql-bin.index | |
log-slave-updates |
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 | |
# | |
# 该脚本简单封装了UFile客户端工具filemgr的增量上传功能 | |
# | |
if [ $# -lt 2 ];then | |
echo "usage:$0 bucket syncdir [prefix]" | |
exit 1 | |
fi |
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 | |
log="./zookeeper.out" | |
if [ -f "$log" ]; then | |
# unit(MB) | |
size=`du -sm "$log" | grep "$log" | awk '{print $1}'` | |
limit=300 | |
# split log | |
if [ $size -gt $limit ]; then | |
newlog="zookeeper-`date +%Y%m%d%H%M%S`.log" |
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 | |
if [ $# -lt 2 ]; then | |
echo "usage:$0 dev prefix" | |
exit 1 | |
fi | |
dev="$1" | |
if [ "$dev" = "" ];then |
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 | |
if [ $# -lt 1 ]; then | |
echo "usage:$0 dev" | |
exit | |
fi | |
dev="$1" | |
echo "it will rw the dev:$dev, are you sure?[Y/n]" | |
read cmd |
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 python2 | |
import sys, os | |
import random | |
import time | |
import MySQLdb | |
if __name__ == "__main__": |
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 python | |
import sys, os | |
import string | |
import random | |
def id_generator(size=6, chars=string.ascii_uppercase): | |
return ''.join(random.choice(chars) for x in range(size)) | |
if __name__ == "__main__": |
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 | |
if [ $# -lt 1 ];then | |
echo "usage:$0 pid [nproc=1024000]" | |
exit 1 | |
fi | |
pid=$1 | |
if [ $# -ge 2 ];then | |
nproc="$2ll" |
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 | |
if [ $# -lt 2 ];then | |
echo "usage:$0 deleted_list existed_list" | |
exit 1 | |
fi | |
deleted_list=$1 | |
existed_list=$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
#!/bin/bash | |
if [ $# -lt 1 ];then | |
echo "usage:$0 process_name" | |
exit 1 | |
fi | |
process_name="$1" | |
function straceall() |
OlderNewer