Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing the master and slave jargon #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions MySQL/custom_scripts/mysql_perf_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,9 +454,9 @@ def log_written(self):
for i in res:
print i[0]

def slave_running(self):
def subordinate_running(self):
"""
检测slave 线程是否在运行 IO tread 和 SQL tread 都运行则ON
检测subordinate 线程是否在运行 IO tread 和 SQL tread 都运行则ON
"""
sql = "SELECT VARIABLE_VALUE \
FROM INFORMATION_SCHEMA.GLOBAL_STATUS \
Expand All @@ -466,14 +466,14 @@ def slave_running(self):
for i in res:
print i[0]

def slave_delayed(self):
def subordinate_delayed(self):
"""
Slave 落后 Master 时长,单位秒
Subordinate 落后 Main 时长,单位秒
"""
sql = "SHOW SLAVE STATUS"
self.cur_dict.execute(sql)
res = self.cur_dict.fetchall()
print res[0]['Seconds_Behind_Master']
print res[0]['Seconds_Behind_Main']


class Main(Checks):
Expand Down