From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: ak@linux.intel.com, tony.luck@intel.com, andi@firstfloor.org,
bp@amd64.org
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
linux-edac@vger.kernel.org, ananth@in.ibm.com
Subject: [PATCH] [mcelog] Start using the new sysfs tunables location
Date: Wed, 05 Sep 2012 16:02:37 +0530 [thread overview]
Message-ID: <20120905103237.9726.56131.stgit@localhost.localdomain> (raw)
In-Reply-To: <20120905102156.9423.27806.stgit@localhost.localdomain>
All the current mce tunables are now available under
/sys/devices/system/machinecheck. Start using this new location, but fall back
to the older per-cpu location so that we continue working with older kernels.
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
---
README | 2 +-
mcelog.init | 5 ++++-
tests/test | 7 ++++++-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/README b/README
index 08184ed..0426460 100644
--- a/README
+++ b/README
@@ -18,7 +18,7 @@ significantly (upto 10 minutes) and does not allow mcelog to keep extended state
trigger is a newer method where the kernel runs mcelog on a error.
This is configured with
-echo /usr/sbin/mcelog > /sys/devices/system/machinecheck/machinecheck0/trigger
+echo /usr/sbin/mcelog > /sys/devices/system/machinecheck/trigger
This is faster, but still doesn't allow mcelog to keep state,
and has relatively high overhead for each error because a program has
to be initialized from scratch.
diff --git a/mcelog.init b/mcelog.init
index 0abe786..5f32ba7 100755
--- a/mcelog.init
+++ b/mcelog.init
@@ -31,7 +31,10 @@ MCELOG_OPTIONS=""
# private settings
MCELOG=${MCELOG:-/usr/sbin/mcelog}
-TRIGGER=/sys/devices/system/machinecheck/machinecheck0/trigger
+TRIGGER=/sys/devices/system/machinecheck/trigger
+if [ ! -e $TRIGGER ] ; then
+ TRIGGER=/sys/devices/system/machinecheck/machinecheck0/trigger
+fi
[ ! -x $MCELOG ] && ( echo "mcelog not found" ; exit 1 )
[ ! -r /dev/mcelog ] && ( echo "/dev/mcelog not active" ; exit 0 )
diff --git a/tests/test b/tests/test
index c673eb2..52daf01 100755
--- a/tests/test
+++ b/tests/test
@@ -17,10 +17,15 @@ if [ "$(whoami)" != "root" ] ; then
exit 1
fi
+TRIGGER=/sys/devices/system/machinecheck/trigger
+if [ ! -e $TRIGGER ] ; then
+ TRIGGER=/sys/devices/system/machinecheck/machinecheck0/trigger
+fi
+
echo "++++++++++++ running $1 test +++++++++++++++++++"
# disable trigger
-echo -n "" > /sys/devices/system/machinecheck/machinecheck0/trigger
+echo -n "" > $TRIGGER
killall mcelog || true
#killwatchdog() {
next prev parent reply other threads:[~2012-09-05 10:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-05 10:21 [PATCH 0/3] x86:mce: Some cleanups and bios-set CMCI thresholds Naveen N. Rao
2012-09-05 10:21 ` [PATCH 1/3] x86/mce: Make sysfs tunables available globally across all cpus Naveen N. Rao
2012-09-05 10:32 ` Naveen N. Rao [this message]
2012-09-05 18:47 ` [PATCH] [mcelog] Start using the new sysfs tunables location Andi Kleen
2012-09-05 19:09 ` Tony Luck
2012-09-06 6:40 ` Naveen N. Rao
2012-09-06 12:28 ` Andi Kleen
2012-09-06 12:34 ` Naveen N. Rao
2012-09-06 12:51 ` Alan Cox
2012-09-06 13:21 ` Andi Kleen
2012-09-05 10:22 ` [PATCH 2/3] x86/mce: Pack boolean MCE flags into a structure Naveen N. Rao
2012-09-05 17:15 ` Joe Perches
2012-09-05 18:56 ` Tony Luck
2012-09-06 6:48 ` Naveen N. Rao
2012-09-06 12:15 ` Borislav Petkov
2012-09-05 10:22 ` [PATCH 3/3] x86/mce: Honour bios-set CMCI threshold Naveen N. Rao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120905103237.9726.56131.stgit@localhost.localdomain \
--to=naveen.n.rao@linux.vnet.ibm.com \
--cc=ak@linux.intel.com \
--cc=ananth@in.ibm.com \
--cc=andi@firstfloor.org \
--cc=bp@amd64.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox