diff --git a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py index b7398d87c..d31e3e256 100644 --- a/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py +++ b/xCAT-openbmc-py/lib/python/agent/hwctl/openbmc/openbmc_bmcconfig.py @@ -49,8 +49,9 @@ class OpenBMCBmcConfigTask(ParallelNodesCommand): formatted_time = time.strftime("%Y%m%d-%H%M", time.localtime(time.time())) dump_log_file = '%s%s_%s_dump_%s.tar.xz' % (XCAT_LOG_DUMP_DIR, formatted_time, node, download_id) + host_name = os.uname()[1].split('.', 1)[0] if flag_dump_process: - self.callback.info('%s: Downloading dump %s to %s' % (node, download_id, dump_log_file)) + self.callback.info('%s: Downloading dump %s to %s:%s' % (node, download_id, host_name, dump_log_file)) obmc.download_dump(download_id, dump_log_file) if os.path.exists(dump_log_file): @@ -61,7 +62,7 @@ class OpenBMCBmcConfigTask(ParallelNodesCommand): if grep_string: self.callback.error('Invalid dump %s was specified. Use -l option to list.' % download_id, node) else: - self.callback.info('%s: Downloaded dump %s to %s.' % (node, download_id, dump_log_file)) + self.callback.info('%s: Downloaded dump %s to %s:%s.' % (node, download_id, host_name, dump_log_file)) else: self.callback.error('Failed to download dump %s to %s.' % (download_id, dump_log_file), node) return diff --git a/xCAT-server/lib/xcat/plugins/openbmc.pm b/xCAT-server/lib/xcat/plugins/openbmc.pm index f704bf8ae..c730f36c4 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc.pm @@ -19,6 +19,7 @@ use JSON; use HTTP::Async; use HTTP::Cookies; use LWP::UserAgent; +use Sys::Hostname; use File::Basename; use File::Spec; use File::Copy qw/copy cp mv move/; @@ -4202,7 +4203,8 @@ sub dump_download_process { return 1; } if ($h->{message} eq $::RESPONSE_OK) { - xCAT::SvrUtils::sendmsg("Downloading dump $dump_id to $file_name", $callback, $node); + my @host_name = split(/\./, hostname()); + xCAT::MsgUtils->message("I", { data => ["$node: Downloading dump $dump_id to $host_name[0]:$file_name"] }, $callback); my $curl_dwld_result = `$curl_dwld_cmd -s`; if (!$curl_dwld_result) { if ($xcatdebugmode) { @@ -4221,7 +4223,7 @@ sub dump_download_process { # Remove downloaded file, nothing useful inside of it unlink $file_name; } else { - xCAT::SvrUtils::sendmsg("Downloaded dump $dump_id to $file_name", $callback, $node) if ($::VERBOSE); + xCAT::MsgUtils->message("I", { data => ["$node: Downloaded dump $dump_id to $host_name[0]:$file_name"] }, $callback) if ($::VERBOSE); } } else {