Search This Blog

Monday, March 19, 2007

Script to flush logs from replicant host to master

#!/bin/sh
# Format host:username:password
hosts="host1:username1:password1 host2:username2:password2"

###
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
for system in $hosts ; do
host=`echo $system | cut -d : -f 1`
user=`echo $system | cut -d : -f 2`
password=`echo $system | cut -d : -f 3`

log=`mysql -S /tmp/$host-mysql.sock -B --skip-column-names mysql -e "show slave status" | cut -f 6`

if [ ${log} ]; then
mysql -h $host -u $user -p$password -e "PURGE MASTER LOGS TO '$log';"
fi
pid="/home/$host/`hostname`.pid"
kill -HUP `cat $pid`
done

11 comments:

Anonymous said...

If you could e-mail me with a few suggestions on just how you made your blog look this excellent, I would be grateful.

Guo Guo said...

caihuanglin20150304
ray ban glasses
canada goose jacket
ray bans
burberry outlet
canada goose
hollister co
michael kors outlet online
jordan 3
hollister clothing store
michael kors outlet online sale
coach outlet
ralph lauren
mont blanc legend
toms wedges
red timberland boots
tory burch outlet
gucci belts
ugg boots
ugg boots
jordan 11 columbia
abercrombie & fitch new york
louis vuitton handbags
coach outlet store online
polo outlet
canada goose sale
coach outlet
christian louboutin outlet
ugg outlet
michael kors outlet online
abercrombie kids

chenlina said...

chenlina20150611
oakley sunglasses
hollister clothing
jordan 5
abercrombie and fitch
coach outlet store online
gucci bags
www.louisvuitton.com
michael kors handbags
mont blanc pens
louis vuitton handbags
louis vuitton handbags
hollister kids
michael kors
discount oakley sunglasses
ray ban sungalsses
louis vuitton
louis vuitton outlet
chanel handbags
timberlands
jordan 6 rings
ray ban sunglasses
ray ban outlet
michael kors
coach outlet online
hermes birkin
kevin durant basketball shoes
michael kors outlet online
oakley sunglasses sale
coach factory outlet
kate spade
ray ban outlet
louis vuitton outlet
replica rolex watches
michael kors
gucci handbags
insanity workout
chanel handbags
christian louboutin outlet
hogan outlet
abercrombie store

风骚达哥 said...

20150922 junda
abercrombie
Hollister uk
Air Jordan 3 III Retro Free Shipping
louis vuitton
coach outlet
Cheap Jordans For Sale Wholesale
canada goose jackets
Christian Louis Vuitton Red Bottoms
New Louis Vuitton Handbags Outlet
Official Coach Factory Outlet Online Sale
Jordan 13 Shoes For Sale
canada goose outlet
Real Louis Vuitton Bags
nike trainers
Jordan 8 Bugs Bunny
Authentic Louis Vuitton Belts Outlet Store
burberry outlet
Louis Vuitton Bags On Sale
true religion jeans
canada goose outlet online
Lebron James Basketball Shoes Sale
Louis Vuitton Handbags Discount Off
nfl jerseys
Abercrombie T-Shirts
Discount Ray Ban Polarized Sunglasses
coach factory outlet online
Louis Vuitton Outlet USA
celine
Louis Vuitton Luxury Official Website
michael kors outlet

chenlili said...

2016-4-21 xiaobao
longchamp handbags
christian louboutin outlet
cheap jordan shoes
louis vuitton handbags
coach outlet online
air jordan retro
polo ralph lauren
toms shoes
oakley outlet
adidas uk
michael kors outlet clearance
jordans
fitflop sandals
coach outlet
ray ban sunglasses
michael kors handbags
coach factorty outlet
nike outlet store
tory burch outlet
nike outlet store
ray ban
adidas originals
ugg boots
ray ban wayfarer
ray ban sunglasses
polo ralph lauren
oakley vault
coach factory outlet
christian louboutin outlet
louis vuitton handbags
michael kors outlet online
jordan 8s
michael kors outlet
coach factory outlet
adidas originals shoes
ray ban sunglasses
jordan 13
true religion outlet
air jordans
vans shoes

Gege Dai said...

ralph lauren outlet
louis vuitton bags
hollister
longchamp pliage
timberland boots
pandora jewelry
ralph lauren uk
coach outlet canada
michael kors outlet online
nike roshe run shoes
adidas trainers
michael kors handbags
new balance shoes
ugg sale
rolex uk
chaussure louboutin
vans shoes
longchamp pliage
tory burch outlet online
cheap michael kors handbags
asics
coach outlet
ghd hair straighteners
mizuno running shoes
cartier watches
michael kors outlet
cartier watches
bottega veneta outlet online
nike outlet store
tiffany jewellery
nike free running
beats headphones
kobe shoes
coach outlet
nike trainers uk
czq20160726

chenmeinv0 said...

ugg outlet
vikings jerseys
oakley sunglasses outlet
coach outlet
coach factory outlet
mbt shoes men
louboutin uk
adidas outlet
ray ban glasses
ugg boots
20172.6chenjinyan

shengda xu said...

pandora bracelet
polo ralph lauren outlet online
cheap oakley sunglasses
louboutin shoes
michael kors outlet store
michael kors handbags outlet
adidas yeezy boost
pandora jewelry outlet
michael kors uk
bercrombie
xushengda0528

kkk said...

ray ban sunglasses outlet
coach handbags outlet
adidas uk
fitflop
mulberry bags
yeezy boost
montblanc pens
kate spade bags
ray ban sunglasses outlet
nike sneakers
170627yueqin

dong dong23 said...

ralph lauren outlet
nike blazer shoes
ugg boots clearance
oakley sunglasses
carrera sunglasses
nike outlet
michael kors outlet
air jordans
ralph lauren outlet
cheap nfl jerseys
20179.4wengdongdong

fangyaoting said...

20180616 junda
bucks jerseys
pandora
adidas soccer shoes
oakley sunglasses
polo ralph lauren
celtics jerseys
coach outlet canada
dolce and gabbana
fendi handbags
saucony shoes