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

fix: obdiag实现参数、变量采集和比对功能 #337

Merged
merged 18 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion handler/analyzer/analyze_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def analyze_parameter_default(self):
report_default_tb.add_row([row[1], row[2], row[3], row[4], tenant_id, row[6], row[11], row[7]])
fp.write(report_default_tb.get_string() + "\n")
self.stdio.print(report_default_tb.get_string())
self.stdio.print("Analyze parameter default finished. For more details, please run cmd '" + Fore.YELLOW + " cat {0}' ".format(file_name) + Style.RESET_ALL + "'")
self.stdio.print("Analyze parameter default finished. For more details, please run cmd '" + Fore.YELLOW + " cat {0}' ".format(file_name) + Style.RESET_ALL)
else:
if self.parameter_file_name is None:
self.stdio.error("the version of OceanBase is lower than 4.2.2, an initialization parameter file must be provided to find non-default values")
Expand All @@ -180,6 +180,8 @@ def analyze_parameter_default(self):
with open(self.parameter_file_name, 'r', newline='') as file:
reader = csv.reader(file)
for row in reader:
if row[0] == 'VERSION':
continue
key = str(row[1]) + '-' + str(row[2]) + '-' + str(row[3]) + '-' + str(row[4]) + '-' + str(row[5]) + '-' + str(row[6])
value = row[7]
file_parameter_dict[key] = value
Expand Down Expand Up @@ -211,6 +213,8 @@ def alalyze_parameter_diff(self):
with open(self.parameter_file_name, 'r', newline='') as file:
reader = csv.reader(file)
for row in reader:
if row[0] == 'VERSION':
continue
parameter_info.append(row)
tenants_dict = dict()
for row in parameter_info:
Expand Down
2 changes: 2 additions & 0 deletions handler/analyzer/analyze_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def analyze_variable(self):
with open(self.variable_file_name, 'r', newline='') as file:
reader = csv.reader(file)
for row in reader:
if row[0] == 'VERSION':
continue
key = str(row[1]) + '-' + str(row[3])
file_variable_dict[key] = str(row[5])
if not last_gather_time:
Expand Down
Loading