You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
392 B
19 lines
392 B
2 years ago
|
#!/bin/bash
|
||
|
|
||
|
# 先杀后启,万无一失
|
||
|
|
||
|
ps -ef |grep binlog_loader |awk '{print $2}'|xargs kill -9
|
||
|
|
||
|
ps -ef |grep binlog_miner | awk '{print $2}'|xargs kill -9
|
||
|
|
||
|
|
||
|
sleep 3s
|
||
|
|
||
|
#功能:启动两个进程
|
||
|
|
||
|
nohup ./binlog_miner 1>/usr/local/mysql2pg/bin/logs/minner.log 2>&1 &
|
||
|
|
||
|
nohup ./binlog_loader 1>/usr/local/mysql2pg/bin/logs/loader.log 2>&1 &
|
||
|
|
||
|
echo '恭喜,两个进程成功启动!'
|