Skip to content

Commit

Permalink
fixed: analyze memory (#642)
Browse files Browse the repository at this point in the history
* Rename Dockerfile to DockerFile

* fixed: analyze memory
  • Loading branch information
Teingi authored Dec 19, 2024
1 parent 8cbe96f commit 8fef75c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/handler/analyzer/analyze_memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
import tabulate
import threading
import uuid
from src import common as ssh_client_local_client
from src.common.command import get_observer_version_by_sql
from src.common.tool import DirectoryUtil, TimeUtils, Util, NetUtils, FileUtil
from src.common.obdiag_exception import OBDIAGFormatException
from src.common.constant import const
from src.common.command import download_file, get_logfile_name_list, mkdir, delete_file
from src.common.command import SshClient
from src.common.ssh_client.local_client import LocalClient
from src.common.result_type import ObdiagResult


Expand Down Expand Up @@ -537,7 +537,7 @@ def __pharse_offline_log_file(self, ssh_client, log_name, local_store_dir):
:return:
"""

ssh_client = ssh_client_local_client.LocalClient(context=self.context, node={"ssh_type": "local"})
ssh_client = LocalClient(context=self.context, node={"ssh_type": "local"})
local_store_path = "{0}/{1}".format(local_store_dir, str(log_name).strip(".").replace("/", "_"))
if self.grep_args is not None:
grep_cmd = "grep -e '{grep_args}' {log_name} >> {local_store_path} ".format(grep_args=self.grep_args, log_name=log_name, local_store_path=local_store_path)
Expand All @@ -547,7 +547,7 @@ def __pharse_offline_log_file(self, ssh_client, log_name, local_store_dir):
download_file(ssh_client, log_name, local_store_path, self.stdio)

def __parse_memory_label(self, file_full_path):
ssh_client = ssh_client_local_client.LocalClient(context=self.context, node={"ssh_type": "local"})
ssh_client = LocalClient(context=self.context, node={"ssh_type": "local"})
if self.version >= '4.3':
grep_cmd = 'grep -n "memory_dump.*statistics" ' + file_full_path
elif self.version >= '4.0' and self.version < '4.3':
Expand Down

0 comments on commit 8fef75c

Please sign in to comment.