]> www.infradead.org Git - users/mchehab/rasdaemon.git/log
users/mchehab/rasdaemon.git
11 years agoAdd two new generated files to .gitignore
Mauro Carvalho Chehab [Fri, 28 Mar 2014 21:47:41 +0000 (18:47 -0300)]
Add two new generated files to .gitignore

The service files are now auto-generated.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoMake paths in the systemd services configurable
Jakub Filak [Fri, 21 Feb 2014 14:54:09 +0000 (15:54 +0100)]
Make paths in the systemd services configurable

The path to a binary depends on configuration, therefore it is better to
not use hard coded strings.

Signed-off-by: Jakub Filak <jfilak@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoras-mc-ctl: Print useful message when run without rasdaemon -r
Betty Dall [Wed, 19 Mar 2014 21:54:56 +0000 (15:54 -0600)]
ras-mc-ctl: Print useful message when run without rasdaemon -r

The utility script ras-mc-ctl requires that rasdaemon --record be run
to create the me_event table in the SQLite database. The current behaviour
is this:
[root@sa1 util]# ras-mc-ctl --errors
DBD::SQLite::db prepare failed: no such table: mc_event at
/usr/local/sbin/ras-mc-ctl line 914.
Can't call method "execute" on an undefined value at
/usr/local/sbin/ras-mc-ctl line 915.

With this change, the user sees:
[root@sa1 util]# ras-mc-ctl --errors
DBD::SQLite::db prepare failed: no such table: mc_event at
/usr/local/sbin/ras-mc-ctl line 914.
ras-mc-ctl: Error: mc_event table missing from
/usr/local/var/lib/rasdaemon/ras-mc_event.db. Run 'rasdaemon --record'.

Signed-off-by: Betty Dall <betty.dall@hp.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agorasdaemon: Add record option to rasdaemon man page
Betty Dall [Wed, 19 Mar 2014 20:59:47 +0000 (14:59 -0600)]
rasdaemon: Add record option to rasdaemon man page

Add the already existing rasdaemon option 'record' to the rasdaemon man
page. This option records events via sqlite3.

Signed-off-by: Betty Dall <betty.dall@hp.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agorasdaemon: Make record option dependent on HAVE_SQULITE3
Betty Dall [Wed, 19 Mar 2014 20:59:46 +0000 (14:59 -0600)]
rasdaemon: Make record option dependent on HAVE_SQULITE3

The record option in parse_opt() can be a compile time option with
the HAVE_SQLITE3 since that option is used in the corresponding
argp_option structure.

Signed-off-by: Betty Dall <betty.dall@hp.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoChange version to 0.5.0 v0.5.0
Mauro Carvalho Chehab [Sun, 16 Feb 2014 10:56:05 +0000 (19:56 +0900)]
Change version to 0.5.0

As this version has a new feature, name it as 0.5.0.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoadd abrt suppport for rasdaemon
Junliang Li [Thu, 13 Feb 2014 02:39:53 +0000 (10:39 +0800)]
add abrt suppport for rasdaemon

Adds abrt as another error mechanism for the rasdaemon.
This patch does:

1) read ras event (mc,mce and aer)

2) setup a abrt-server unix socket

3) write messages follow ABRT server protocol, set event
   info into backtrace zone.

4) commit report.

For now, it depends on ABRT to limit flood reports.

Signed-off-by: Junliang Li <lijunliang.dna@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agomce-amd-k8.c: fix a warning
Mauro Carvalho Chehab [Thu, 13 Feb 2014 20:11:26 +0000 (05:11 +0900)]
mce-amd-k8.c: fix a warning

mce-amd-k8.c: In function ‘bank_name’:
mce-amd-k8.c:250:22: warning: argument to ‘sizeof’ in ‘snprintf’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
  snprintf(buf, sizeof(buf), "%s (bank=%d)", s, e->bank);
                      ^

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoREADME: describe the location of the main repositories
Mauro Carvalho Chehab [Wed, 12 Feb 2014 23:25:15 +0000 (08:25 +0900)]
README: describe the location of the main repositories

As it could have more copies of the rasdaemon in the net, add the
location of the main ones.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoUpdate README to reflect the patch submission process
Mauro Carvalho Chehab [Wed, 12 Feb 2014 23:13:18 +0000 (08:13 +0900)]
Update README to reflect the patch submission process

That helps to better document how to contribute with code.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoBump to version 0.4.2 v0.4.2
Mauro Carvalho Chehab [Tue, 10 Sep 2013 16:22:42 +0000 (13:22 -0300)]
Bump to version 0.4.2

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoras-mc-ctl: Fix the DIMM layout display
Mauro Carvalho Chehab [Thu, 15 Aug 2013 20:13:43 +0000 (17:13 -0300)]
ras-mc-ctl: Fix the DIMM layout display

The items weren't being presented at the right order. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agocontrib/edac-tests: Make it work without edac-utils
Mauro Carvalho Chehab [Thu, 15 Aug 2013 16:26:03 +0000 (13:26 -0300)]
contrib/edac-tests: Make it work without edac-utils

There were a few traces of edac-utils and an older version of
the EDAC trace on this script. Remove them, and change it to
0755 mode.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
11 years agoAdd an example of labels file
Mauro Carvalho Chehab [Thu, 15 Aug 2013 15:58:02 +0000 (12:58 -0300)]
Add an example of labels file

This is an example of a labels file for a Dell Power Edge T620.

For now, only DIMMs A1 and B1 are tested here.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoras-mc-ctl: Fix label register with 2 layers
Mauro Carvalho Chehab [Thu, 15 Aug 2013 15:45:18 +0000 (12:45 -0300)]
ras-mc-ctl: Fix label register with 2 layers

When there aren't 3 layers, label print/register weren't working.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
11 years agoras-mc-ctl: Improve parser
Mauro Carvalho Chehab [Thu, 15 Aug 2013 15:43:02 +0000 (12:43 -0300)]
ras-mc-ctl: Improve parser

Accept either . or : as layers separator at config files.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
12 years agoMakefile.am: fix build if rpmbuild was never called before
Mauro Carvalho Chehab [Tue, 4 Jun 2013 10:41:58 +0000 (07:41 -0300)]
Makefile.am: fix build if rpmbuild was never called before

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoTODO: Update it with the current issues
Mauro Carvalho Chehab [Mon, 3 Jun 2013 13:57:02 +0000 (10:57 -0300)]
TODO: Update it with the current issues

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl: Fix the name of the error table data
Mauro Carvalho Chehab [Fri, 31 May 2013 19:40:40 +0000 (16:40 -0300)]
ras-mc-ctl: Fix the name of the error table data

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl: report errors also for PCIe AER and MCE
Mauro Carvalho Chehab [Fri, 31 May 2013 19:16:44 +0000 (16:16 -0300)]
ras-mc-ctl: report errors also for PCIe AER and MCE

Show also PCIe AER and MCE when used with --errors parameter.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl: add summary for MCE and PCIe AER errors
Mauro Carvalho Chehab [Fri, 31 May 2013 17:57:54 +0000 (14:57 -0300)]
ras-mc-ctl: add summary for MCE and PCIe AER errors

Report the summary also for MCE and PCIe errors.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd support to store MCE events at the database
Mauro Carvalho Chehab [Fri, 31 May 2013 17:18:24 +0000 (14:18 -0300)]
Add support to store MCE events at the database

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd support to record AER events
Mauro Carvalho Chehab [Fri, 31 May 2013 16:54:11 +0000 (13:54 -0300)]
Add support to record AER events

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-record: Make the code easier to add support for other tables
Mauro Carvalho Chehab [Fri, 31 May 2013 16:53:18 +0000 (13:53 -0300)]
ras-record: Make the code easier to add support for other tables

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-record: reorder functions
Mauro Carvalho Chehab [Fri, 31 May 2013 16:51:55 +0000 (13:51 -0300)]
ras-record: reorder functions

No functional changes

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-record: rename stmt to stmt_mc_event
Mauro Carvalho Chehab [Fri, 31 May 2013 16:10:16 +0000 (13:10 -0300)]
ras-record: rename stmt to stmt_mc_event

This stmt is used only for mc_event. So, rename it, as we'll be
adding other stmts for the other tables.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-record: make the code more generic
Mauro Carvalho Chehab [Fri, 31 May 2013 15:41:01 +0000 (12:41 -0300)]
ras-record: make the code more generic

Now that we're ready to add more tables to the database, make
the code that creates and inserts data into the table more
generic.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl: Improve error summary to show label and mc
Mauro Carvalho Chehab [Thu, 30 May 2013 00:53:58 +0000 (21:53 -0300)]
ras-mc-ctl: Improve error summary to show label and mc

Both information are useful for the users, even on summary.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate rasdaemon.spec.in v0.4.1
Mauro Carvalho Chehab [Wed, 29 May 2013 15:04:29 +0000 (12:04 -0300)]
Update rasdaemon.spec.in

This is exactly what it should be used for Fedora.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoCreate directories via install target
Mauro Carvalho Chehab [Wed, 29 May 2013 14:57:21 +0000 (11:57 -0300)]
Create directories via install target

As the dirs will be created via install target, we may cleanup the
rpm spec model file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMakefile.am: honour destdir at the local install target
Mauro Carvalho Chehab [Wed, 29 May 2013 14:33:11 +0000 (11:33 -0300)]
Makefile.am: honour destdir at the local install target

That avoids building errors like:
/bin/sh /builddir/build/BUILD/rasdaemon-0.4.1/install-sh -d "/var/lib/rasdaemon"
mkdir: cannot create directory '/var/lib/rasdaemon': Permission denied
mkdir: cannot create directory '/var/lib/rasdaemon': Permission denied

When building for a distro package.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoBump to version 0.4.1
Mauro Carvalho Chehab [Wed, 29 May 2013 14:10:44 +0000 (11:10 -0300)]
Bump to version 0.4.1

The sqlite3 bugfix is important enough to deserve a version.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoREADME: update to reflect the need of perl DBI sqlite
Mauro Carvalho Chehab [Wed, 29 May 2013 14:03:04 +0000 (11:03 -0300)]
README: update to reflect the need of perl DBI sqlite

This is now needed by ras-mc-ctl.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMakefile.am: create ${prefix}/var/lib/rasdaemon on install
Mauro Carvalho Chehab [Wed, 29 May 2013 13:59:43 +0000 (10:59 -0300)]
Makefile.am: create ${prefix}/var/lib/rasdaemon on install

rasdaemon -r requires that directory to be created, otherwise,
sql open will fail.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl: add support for queuing the errors
Mauro Carvalho Chehab [Wed, 29 May 2013 12:33:45 +0000 (09:33 -0300)]
ras-mc-ctl: add support for queuing the errors

As the mc_event table is filled by rasdaemon, we need a tool to
extract data from it.

So, use the existing perl script for the basic queries.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-record: use sqlite3_reset to allow reusing the prepared statement
Mauro Carvalho Chehab [Wed, 29 May 2013 10:41:30 +0000 (07:41 -0300)]
ras-record: use sqlite3_reset to allow reusing the prepared statement

Instead of using sqlite3_finalize, we should use sqlite3_reset, or
otherwise the prepared statement will be de-allocated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorasdaemon.spec.in: Require sqlite-devel
Mauro Carvalho Chehab [Wed, 29 May 2013 10:40:46 +0000 (07:40 -0300)]
rasdaemon.spec.in: Require sqlite-devel

This library is needed on builds when --enable-sqlite3 is used.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Fence-post error when reporting number of cpus we listen to
Tony Luck [Tue, 28 May 2013 18:20:36 +0000 (11:20 -0700)]
ras-events: Fence-post error when reporting number of cpus we listen to

I see:
rasdaemon: Listening to events for cpus 0 to 64

which would be 65 total cpus - I only have 64.

Fix the log message to use "n_cpus - 1" rather than "n_cpus".

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a tool to automate releasing new versions v0.4.0
Mauro Carvalho Chehab [Tue, 28 May 2013 18:10:05 +0000 (15:10 -0300)]
Add a tool to automate releasing new versions

This small script automates the process of building newer
versions of the tool.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoReplace some hard-coded strings by the autotools macro names
Mauro Carvalho Chehab [Tue, 28 May 2013 18:09:29 +0000 (15:09 -0300)]
Replace some hard-coded strings by the autotools macro names

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoBump version to 0.4.0
Mauro Carvalho Chehab [Tue, 28 May 2013 18:00:22 +0000 (15:00 -0300)]
Bump version to 0.4.0

There are too many changes already. Bump it to version 0.4.0.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: parse errors at select_tracing_timestamp()
Mauro Carvalho Chehab [Tue, 28 May 2013 17:58:36 +0000 (14:58 -0300)]
ras-events: parse errors at select_tracing_timestamp()

This fixes the following warnings:
ras-events.c: In function 'select_tracing_timestamp':
ras-events.c:501:6: warning: ignoring return value of 'read', declared with attribute warn_unused_result [-Wunused-result]
ras-events.c:531:8: warning: ignoring return value of 'fscanf', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoStore RAS sqlite3 db file on a proper place
Mauro Carvalho Chehab [Tue, 28 May 2013 17:08:07 +0000 (14:08 -0300)]
Store RAS sqlite3 db file on a proper place

Instead of creating it on the same directory as when it
is called, put it at ${prefix}/var/lib/rasdaemon directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: use sysconf to get the number of CPU's
Mauro Carvalho Chehab [Tue, 28 May 2013 14:37:50 +0000 (11:37 -0300)]
ras-events: use sysconf to get the number of CPU's

There are several "per-cpu" files at sysfs that seem to be
utterly bogus, as trying to poll from them just return POLLERR.

Let's use, instead, sysconf() to get the number of CPU's, avoiding
such bug.

Not sure if this would work with hotplugged CPU's, though, so
let's preserve the old code there, for now.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Only use pthreads for collect if poll() not available
Mauro Carvalho Chehab [Tue, 28 May 2013 11:47:57 +0000 (08:47 -0300)]
ras-events: Only use pthreads for collect if poll() not available

Before kernel 3.10, one pthread per cpu was used, as the code
would need to run an endless loop, in order to get events.

With kernel 3.10 and upper, we can simply use poll() there.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mce-handler: change the test order to avoid leaked memory
Mauro Carvalho Chehab [Tue, 28 May 2013 11:13:17 +0000 (08:13 -0300)]
ras-mce-handler: change the test order to avoid leaked memory

As getdelim allocates memory, the better is to swap the
tests, or otherwise the code will allocate some memory that
will never be de-allocated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mce-handler: Fix /proc/cpuinfo parser
Mauro Carvalho Chehab [Tue, 28 May 2013 10:47:53 +0000 (07:47 -0300)]
ras-mce-handler: Fix /proc/cpuinfo parser

The test for the parsing completion is wrong. Fix it.

While here, change the namespace to avoid latter
conflicts.

Reported-by: Chen Gong <gong.chen@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mce-handler: Fix a warning
Mauro Carvalho Chehab [Mon, 27 May 2013 21:19:08 +0000 (18:19 -0300)]
ras-mce-handler: Fix a warning

ras-mce-handler.c: In function ‘register_mce_handler’:
ras-mce-handler.c:200:13: warning: ‘mce’ may be used uninitialized in this function [-Wuninitialized]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoEnable MCE parsing at RPM files
Mauro Carvalho Chehab [Mon, 27 May 2013 20:47:15 +0000 (17:47 -0300)]
Enable MCE parsing at RPM files

As this is known to work, enable it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoREADME: update to reflect the current status
Mauro Carvalho Chehab [Mon, 27 May 2013 20:46:56 +0000 (17:46 -0300)]
README: update to reflect the current status

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate TODO list
Mauro Carvalho Chehab [Mon, 27 May 2013 20:26:04 +0000 (17:26 -0300)]
Update TODO list

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel-sb: add memory controller decoding
Mauro Carvalho Chehab [Mon, 27 May 2013 20:23:48 +0000 (17:23 -0300)]
mce-intel-sb: add memory controller decoding

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd support to decode memory controller data on Nehalem
Mauro Carvalho Chehab [Mon, 27 May 2013 20:19:11 +0000 (17:19 -0300)]
Add support to decode memory controller data on Nehalem

xeon75xx code can be dropped as it doesn't exist anyway on
mcelog. According to the code there, it lacks support for it
to work at the Kernel.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel: Enable iMC log where available
Mauro Carvalho Chehab [Mon, 27 May 2013 19:46:12 +0000 (16:46 -0300)]
mce-intel: Enable iMC log where available

Add a code to enable iMC log where available.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce-intel-ivb: enable the code that parses memory controller errors
Mauro Carvalho Chehab [Mon, 27 May 2013 18:50:51 +0000 (15:50 -0300)]
mce-intel-ivb: enable the code that parses memory controller errors

Enable the code that parses the memory controller errors.
This code assumes that iMC log is already enabled.

A latter patch will add support for enabling it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agospelling: Fix spelling in ras-record.c
Tony Luck [Fri, 24 May 2013 16:55:40 +0000 (09:55 -0700)]
spelling: Fix spelling in ras-record.c

s/interted/inserted/

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoconfigure: Fix help string for sqlite3
Tony Luck [Fri, 24 May 2013 16:29:06 +0000 (09:29 -0700)]
configure: Fix help string for sqlite3

The AS_HELP_STRING has a typo and says to use "--enable-sqlite" when
it should say "-enable-sqlite3"

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agomce: Some improvements at the output format
Mauro Carvalho Chehab [Fri, 24 May 2013 14:21:32 +0000 (11:21 -0300)]
mce: Some improvements at the output format

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mce-handler: fix /proc/cpuinfo parser
Mauro Carvalho Chehab [Fri, 24 May 2013 11:21:51 +0000 (08:21 -0300)]
ras-mce-handler: fix /proc/cpuinfo parser

The scanf parsers for /proc/cpuinfo were broken, as they
got a "mce->" prefix by mistake. Remove it to fix.

With that, MCE parser will successfully register.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoevent-parse: Remove a temporary debug message
Mauro Carvalho Chehab [Fri, 24 May 2013 11:18:48 +0000 (08:18 -0300)]
event-parse: Remove a temporary debug message

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoDon't require that all tracing types to be supported
Mauro Carvalho Chehab [Fri, 24 May 2013 11:16:57 +0000 (08:16 -0300)]
Don't require that all tracing types to be supported

Not all systems support all 3 types of RAS (EDAC, PCIe AER, MCELOG).
Don't bail out if at least one of them is supported.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate edac-tests to use ras-mc-ctl instead of ./edac-ctl
Mauro Carvalho Chehab [Fri, 24 May 2013 10:37:06 +0000 (07:37 -0300)]
Update edac-tests to use ras-mc-ctl instead of ./edac-ctl

All functionalities previously found on my test version of
edac-ctl is present on ras-mc-ctl. So, let's rename it.

The test code still tries to run edac-util. This tool,
which is part of edac-utils, use the edac error counters to
check the errors. For now, let's keep it, as it might be useful,
although this will likely be removed on future versions of this
testing script.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Fix the logic that retrieves the debugfs mount point
Mauro Carvalho Chehab [Fri, 24 May 2013 09:18:54 +0000 (06:18 -0300)]
ras-events: Fix the logic that retrieves the debugfs mount point

While on Fedora/RHEL the mount device for debugfs is called "debugfs",
it is usual to use "none" on some other distros or for manually
mounted debugfs.

So, fix the logic to look at the filesystem type, instead, as it should
always be "debugfs", on both cases.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-record: Avoid NULL pointer when running without sqlite
Tony Luck [Thu, 23 May 2013 20:27:31 +0000 (13:27 -0700)]
ras-record: Avoid NULL pointer when running without sqlite

When running "rasdaemon -f" we can dereference a NULL pointer in
ras_store_mc_event() since "ras->db_priv" is NULL.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Fix MCE binding
Mauro Carvalho Chehab [Thu, 23 May 2013 19:42:08 +0000 (16:42 -0300)]
ras-events: Fix MCE binding

The #ifdef for detecting MCE was wrong. Due to that, the MCE
handler was not being enabled.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoMake the enable function more generic
Mauro Carvalho Chehab [Thu, 23 May 2013 19:37:54 +0000 (16:37 -0300)]
Make the enable function more generic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoGet rid of ras-record warnings
Mauro Carvalho Chehab [Thu, 23 May 2013 17:58:21 +0000 (14:58 -0300)]
Get rid of ras-record warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoget rid of MCE warnings
Mauro Carvalho Chehab [Thu, 23 May 2013 17:44:36 +0000 (14:44 -0300)]
get rid of MCE warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoCleanup warnings at ras-aer-handler.c
Mauro Carvalho Chehab [Thu, 23 May 2013 17:26:07 +0000 (14:26 -0300)]
Cleanup warnings at ras-aer-handler.c

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix event handler parser logic
Mauro Carvalho Chehab [Thu, 23 May 2013 16:35:07 +0000 (13:35 -0300)]
Fix event handler parser logic

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-events: Add some hacks to make it work with 3.6.10-rc2
Mauro Carvalho Chehab [Thu, 23 May 2013 14:48:02 +0000 (11:48 -0300)]
ras-events: Add some hacks to make it work with 3.6.10-rc2

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agolibtrace: sync with the latest code from trace-cmd
Mauro Carvalho Chehab [Thu, 23 May 2013 14:07:29 +0000 (11:07 -0300)]
libtrace: sync with the latest code from trace-cmd

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoedac-fake-inject: Check if the Kernel supports error injection
Mauro Carvalho Chehab [Thu, 23 May 2013 13:24:03 +0000 (10:24 -0300)]
edac-fake-inject: Check if the Kernel supports error injection

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoGet rid of mc_event_error_type
Mauro Carvalho Chehab [Thu, 23 May 2013 12:35:38 +0000 (09:35 -0300)]
Get rid of mc_event_error_type

Somehow, the tracing library is not finding it on some systems:
overriding event (710) ras:mc_event with new print handler
trace-cmd: File exists
  function mc_event_error_type not defined

Let's just get rid of it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoBetter handle parser errors with MC events
Mauro Carvalho Chehab [Thu, 23 May 2013 12:09:19 +0000 (09:09 -0300)]
Better handle parser errors with MC events

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoedac-fake-inject: Make it more generic
Mauro Carvalho Chehab [Thu, 23 May 2013 12:01:10 +0000 (09:01 -0300)]
edac-fake-inject: Make it more generic

The tool used to support only 2 or 3 layer memory controllers,
faling with edac_ghes driver. Make it more generic to also work
there.

Also, don't assume that the SYSFS is mounted at /sys/kernel/debug,
but look at its mount location via /proc/mounts.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix rasdaemon -d
Mauro Carvalho Chehab [Thu, 23 May 2013 11:21:55 +0000 (08:21 -0300)]
Fix rasdaemon -d

We need to get the debugfs pointer in order to toggle the MC events.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoGet rid of the remaining warnings
Mauro Carvalho Chehab [Thu, 23 May 2013 10:25:54 +0000 (07:25 -0300)]
Get rid of the remaining warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agolibtrace: get rid of breakpoint() function
Mauro Carvalho Chehab [Thu, 23 May 2013 10:23:11 +0000 (07:23 -0300)]
libtrace: get rid of breakpoint() function

This isn't used anywhere.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoGet rid of most warnings at libtrace
Mauro Carvalho Chehab [Thu, 23 May 2013 10:22:40 +0000 (07:22 -0300)]
Get rid of most warnings at libtrace

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix usage of toggle_ras_mc_event() by -d parameter
Mauro Carvalho Chehab [Thu, 23 May 2013 10:10:53 +0000 (07:10 -0300)]
Fix usage of toggle_ras_mc_event() by -d parameter

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoEnable gcc warnings
Mauro Carvalho Chehab [Thu, 23 May 2013 10:07:44 +0000 (07:07 -0300)]
Enable gcc warnings

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorasdaemon.spec: specify the root directory on a consistent way v0.3.0
Mauro Carvalho Chehab [Tue, 21 May 2013 02:37:23 +0000 (23:37 -0300)]
rasdaemon.spec: specify the root directory on a consistent way

As fedora-review tool complained:

- Package consistently uses macro is (instead of hard-coded directory names).
  Note: Using both %{buildroot} and $RPM_BUILD_ROOT
  See: http://fedoraproject.org/wiki/Packaging/Guidelines#macros

Let's just use %{buildroot}.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate it to point it to fedorapeople
Mauro Carvalho Chehab [Tue, 21 May 2013 02:24:09 +0000 (23:24 -0300)]
Update it to point it to fedorapeople

The tarball used to generate the src.rpm is the one produced
by "make dist-bz2", with doesn't contain .gitignore files,
while fedorahosted only generates an snapshot with them.

That makes its hash to not match the one used at .src.rpm.

Fix it by using the uploaded file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a target to upload a new version
Mauro Carvalho Chehab [Tue, 21 May 2013 01:54:54 +0000 (22:54 -0300)]
Add a target to upload a new version

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoUpdate the spec file to require autotools for building it
Mauro Carvalho Chehab [Tue, 21 May 2013 01:51:05 +0000 (22:51 -0300)]
Update the spec file to require autotools for building it

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorasdaemon.spec: Don't install INSTALL file
Mauro Carvalho Chehab [Tue, 21 May 2013 01:00:50 +0000 (22:00 -0300)]
rasdaemon.spec: Don't install INSTALL file

rpmlint complains with that:
rasdaemon.x86_64: W: install-file-in-docs /usr/share/doc/rasdaemon-0.3.0/INSTALL

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorpmlint: fix version compliant
Mauro Carvalho Chehab [Tue, 21 May 2013 00:45:04 +0000 (21:45 -0300)]
rpmlint: fix version compliant

rasdaemon.x86_64: W: incoherent-version-in-changelog 0.2.0-1 ['0.3.0-1.fc18', '0.3.0-1']

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoras-mc-ctl.8.in: fix rpmlint compliants
Mauro Carvalho Chehab [Tue, 21 May 2013 00:40:01 +0000 (21:40 -0300)]
ras-mc-ctl.8.in: fix rpmlint compliants

rasdaemon.x86_64: W: manual-page-warning /usr/share/man/man8/ras-mc-ctl.8.gz 79: a space character is not allowed in an escape name
rasdaemon.x86_64: W: manual-page-warning /usr/share/man/man8/ras-mc-ctl.8.gz 122: warning: macro `EL' not defined

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoWhitespace cleanups
Mauro Carvalho Chehab [Tue, 21 May 2013 00:34:17 +0000 (21:34 -0300)]
Whitespace cleanups

No functional changes here, just whitespacing cleanups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agorpmlint target: RPMS files are wrong. Fix it.
Mauro Carvalho Chehab [Tue, 21 May 2013 00:30:54 +0000 (21:30 -0300)]
rpmlint target: RPMS files are wrong. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoFix rpmlint check line
Mauro Carvalho Chehab [Tue, 21 May 2013 00:28:26 +0000 (21:28 -0300)]
Fix rpmlint check line

It should not be checking the .tar.bz2, but, instead, the generated
rpm files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd missing header files to Makefile.am
Mauro Carvalho Chehab [Tue, 21 May 2013 00:03:53 +0000 (21:03 -0300)]
Add missing header files to Makefile.am

This is needed, in order to generate the proper dist tar files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoBump it to version 0.3.0
Mauro Carvalho Chehab [Mon, 20 May 2013 23:53:09 +0000 (20:53 -0300)]
Bump it to version 0.3.0

As we now have initial mcelog/PCEe AER parsing, bump version
to 0.3.0.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd a rule to build a source rpm file
Mauro Carvalho Chehab [Mon, 20 May 2013 23:52:40 +0000 (20:52 -0300)]
Add a rule to build a source rpm file

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAuto-fill the rasdaemon.spec version
Mauro Carvalho Chehab [Mon, 20 May 2013 22:28:34 +0000 (19:28 -0300)]
Auto-fill the rasdaemon.spec version

Instead of keeping it static, let ./configure to fill the
version of the rasdaemon.spec. That makes it a little easier
to be used on rpm-based distros.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd decoder for Ivy Bridge
Mauro Carvalho Chehab [Sat, 18 May 2013 19:49:33 +0000 (16:49 -0300)]
Add decoder for Ivy Bridge

The code came from mcelog. For now, let's disable the part that
handles the memory controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd decoder for Sandy Bridge
Mauro Carvalho Chehab [Sat, 18 May 2013 19:43:58 +0000 (16:43 -0300)]
Add decoder for Sandy Bridge

The code came from mcelog. For now, let's disable the part that
handles the memory controller.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd decoder for Intel MCE tulsa
Mauro Carvalho Chehab [Sat, 18 May 2013 15:16:46 +0000 (12:16 -0300)]
Add decoder for Intel MCE tulsa

The code came almost as-is from mcelog.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoAdd decoder for Intel Dunnington CPUs
Mauro Carvalho Chehab [Sat, 18 May 2013 15:10:53 +0000 (12:10 -0300)]
Add decoder for Intel Dunnington CPUs

The code came almost as-is from mcelog.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>