8 Star 1 Fork 7

src-anolis-os/rasdaemon

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1032-rasdaemon-ras-mc-ctl-Add-support-to-display-mcastatu.patch 3.64 KB
一键复制 编辑 原始数据 按行查看 历史
From e2efcbe5b1627c577f8d133b958114c34539e459 Mon Sep 17 00:00:00 2001
From: Avadhut Naik <[email protected]>
Date: Mon, 25 Mar 2024 23:06:08 -0500
Subject: [PATCH 32/85] rasdaemon: ras-mc-ctl: Add support to display
mcastatus_msg string
Currently, the mcastatus_msg string of struct mce_event is added to the
SQLite database by the rasdaemon when it is recording errors. The same
however, is not outputted by the ras-mc-ctl utility.
The string provides important error information relating to the received
MCE. For example, on AMD SMCA systems, the string outputs extended error
code and description. As such, the string should be present in the
output of ras-mc-ctl utility.
Add support to output the string through the ras-mc-ctl utility.
Signed-off-by: Avadhut Naik <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
---
util/ras-mc-ctl.in | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
index fb35afe..725d215 100755
--- a/util/ras-mc-ctl.in
+++ b/util/ras-mc-ctl.in
@@ -1329,7 +1329,7 @@ sub errors
{
require DBI;
my ($query, $query_handle, $id, $time, $devname, $count, $type, $msg, $label, $mc, $top, $mid, $low, $addr, $grain, $syndrome, $detail, $out);
- my ($mcgcap,$mcgstatus, $status, $misc, $ip, $tsc, $walltime, $cpu, $cpuid, $apicid, $socketid, $cs, $bank, $cpuvendor, $bank_name, $mcgstatus_msg, $mcistatus_msg, $user_action, $mc_location);
+ my ($mcgcap,$mcgstatus, $status, $misc, $ip, $tsc, $walltime, $cpu, $cpuid, $apicid, $socketid, $cs, $bank, $cpuvendor, $bank_name, $mcgstatus_msg, $mcistatus_msg, $mcastatus_msg, $user_action, $mc_location);
my ($timestamp, $etype, $severity, $etype_string, $severity_string, $fru_id, $fru_text, $cper_data);
my ($bus_name, $dev_name, $driver_name, $reporter_name);
my ($dev, $sector, $nr_sector, $error, $rwbs, $cmd);
@@ -1497,10 +1497,10 @@ sub errors
# MCE mce_record errors
if ($has_mce == 1) {
- $query = "select id, timestamp, mcgcap, mcgstatus, status, addr, misc, ip, tsc, walltime, cpu, cpuid, apicid, socketid, cs, bank, cpuvendor, bank_name, error_msg, mcgstatus_msg, mcistatus_msg, user_action, mc_location from mce_record$conf{opt}{since} order by id";
+ $query = "select id, timestamp, mcgcap, mcgstatus, status, addr, misc, ip, tsc, walltime, cpu, cpuid, apicid, socketid, cs, bank, cpuvendor, bank_name, error_msg, mcgstatus_msg, mcistatus_msg, mcastatus_msg, user_action, mc_location from mce_record$conf{opt}{since} order by id";
$query_handle = $dbh->prepare($query);
$query_handle->execute();
- $query_handle->bind_columns(\($id, $time, $mcgcap,$mcgstatus, $status, $addr, $misc, $ip, $tsc, $walltime, $cpu, $cpuid, $apicid, $socketid, $cs, $bank, $cpuvendor, $bank_name, $msg, $mcgstatus_msg, $mcistatus_msg, $user_action, $mc_location));
+ $query_handle->bind_columns(\($id, $time, $mcgcap,$mcgstatus, $status, $addr, $misc, $ip, $tsc, $walltime, $cpu, $cpuid, $apicid, $socketid, $cs, $bank, $cpuvendor, $bank_name, $msg, $mcgstatus_msg, $mcistatus_msg, $mcastatus_msg, $user_action, $mc_location));
$out = "";
while($query_handle->fetch()) {
$out .= "$id $time error: $msg";
@@ -1508,6 +1508,7 @@ sub errors
$out .= ", bank $bank_name" if ($bank_name);
$out .= ", mcg $mcgstatus_msg" if ($mcgstatus_msg);
$out .= ", mci $mcistatus_msg" if ($mcistatus_msg);
+ $out .= ", mca $mcastatus_msg" if ($mcastatus_msg);
$out .= ", $mc_location" if ($mc_location);
$out .= ", $user_action" if ($user_action);
$out .= sprintf ", mcgcap=0x%08x", $mcgcap if ($mcgcap);
--
2.33.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-anolis-os/rasdaemon.git
[email protected]:src-anolis-os/rasdaemon.git
src-anolis-os
rasdaemon
rasdaemon
a8

搜索帮助