krishnanadh / rpms / rasdaemon

Forked from rpms/rasdaemon a year ago
Clone

Blame SOURCES/0001-ras-mc-ctl-Improve-error-summary-to-show-label-and-m.patch

d9e469
From 5e8fb95e2f6dd3f427e0ae5d7d066aeb6d61fd0f Mon Sep 17 00:00:00 2001
d9e469
From: Mauro Carvalho Chehab <mchehab@redhat.com>
d9e469
Date: Wed, 29 May 2013 21:53:58 -0300
d9e469
Subject: [PATCH 01/32] ras-mc-ctl: Improve error summary to show label and mc
d9e469
d9e469
Both information are useful for the users, even on summary.
d9e469
d9e469
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
d9e469
---
d9e469
 util/ras-mc-ctl.in |    6 +++---
d9e469
 1 files changed, 3 insertions(+), 3 deletions(-)
d9e469
d9e469
diff --git a/util/ras-mc-ctl.in b/util/ras-mc-ctl.in
d9e469
index 32c4edb..5b1ca4d 100755
d9e469
--- a/util/ras-mc-ctl.in
d9e469
+++ b/util/ras-mc-ctl.in
d9e469
@@ -827,15 +827,15 @@ sub summary
d9e469
 
d9e469
     my $dbh = DBI->connect("dbi:SQLite:dbname=$dbname", "", "", {});
d9e469
 
d9e469
-    my $query = "select top_layer,middle_layer,lower_layer, count(*) from mc_event group by top_layer,middle_layer,lower_layer";
d9e469
+    my $query = "select label, mc, top_layer,middle_layer,lower_layer, count(*) from mc_event group by label,mc,top_layer,middle_layer,lower_layer";
d9e469
     my $query_handle = $dbh->prepare($query);
d9e469
     $query_handle->execute();
d9e469
 
d9e469
-    $query_handle->bind_columns(\my($top, $mid, $low, $count));
d9e469
+    $query_handle->bind_columns(\my($label, $mc, $top, $mid, $low, $count));
d9e469
 
d9e469
     print "Memory controller events summary:\n";
d9e469
     while($query_handle->fetch()) {
d9e469
-        print "location: $top:$mid:$low errors: $count\n";
d9e469
+        print "DIMM Label(s): '$label' location: $mc:$top:$mid:$low errors: $count\n";
d9e469
     }
d9e469
 
d9e469
     $query_handle->finish;
d9e469
-- 
d9e469
1.7.1
d9e469