config.h
config.h.in
config.h.in~
+man/ras-mc-ctl.8
stamp-h1
aclocal.m4
config.guess
ACLOCAL_AMFLAGS=-I m4
-SUBDIRS = libtrace util
+SUBDIRS = libtrace util man
EXTRA_DIST = misc/rasdaemon.service
sbin_PROGRAMS = rasdaemon
AC_CANONICAL_SYSTEM
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([Makefile libtrace/Makefile util/Makefile util/ras-mc-ctl])
AM_INIT_AUTOMAKE
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LIBTOOL
+X_AC_META
+
+AC_CONFIG_FILES([
+ Makefile
+ libtrace/Makefile
+ man/Makefile
+ man/ras-mc-ctl.8
+ util/Makefile
+ util/ras-mc-ctl
+])
+
AC_ARG_ENABLE([sqlite3],
AS_HELP_STRING([--enable-sqlite], [enable storing data at SQL lite database (currently experimental]))
AM_CONDITIONAL([WITH_SQLITE3], [test x$enable_sqlite3 = xyes])
AC_SUBST([SQLITE3_LIBS])
+test "$sysconfdir" = '${prefix}/etc' && sysconfdir=/etc
+
AC_OUTPUT
-*
+# Autoreconf adds those
+libtool.m4
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
--- /dev/null
+##*****************************************************************************
+## $Id: x_ac_meta.m4 416 2005-07-20 17:50:27Z dun $
+##*****************************************************************************
+# AUTHOR:
+# Chris Dunlap <cdunlap@llnl.gov>
+#
+# SYNOPSIS:
+# X_AC_META
+#
+# DESCRIPTION:
+# Read metadata from the META file.
+##*****************************************************************************
+
+AC_DEFUN([X_AC_META], [
+ AC_MSG_CHECKING([metadata])
+
+ META="$srcdir/META"
+ _x_ac_meta_got_file=no
+ if test -f "$META"; then
+ _x_ac_meta_got_file=yes
+
+ META_NAME=_X_AC_META_GETVAL([(?:NAME|PROJECT|PACKAGE)]);
+ if test -n "$META_NAME"; then
+ AC_DEFINE_UNQUOTED([META_NAME], ["$META_NAME"],
+ [Define the project name.]
+ )
+ AC_SUBST([META_NAME])
+ fi
+
+ META_VERSION=_X_AC_META_GETVAL([VERSION]);
+ if test -n "$META_VERSION"; then
+ AC_DEFINE_UNQUOTED([META_VERSION], ["$META_VERSION"],
+ [Define the project version.]
+ )
+ AC_SUBST([META_VERSION])
+ fi
+
+ META_RELEASE=_X_AC_META_GETVAL([RELEASE]);
+ if test -n "$META_RELEASE"; then
+ AC_DEFINE_UNQUOTED([META_RELEASE], ["$META_RELEASE"],
+ [Define the project release.]
+ )
+ AC_SUBST([META_RELEASE])
+ fi
+
+ if test -n "$META_NAME" -a -n "$META_VERSION"; then
+ META_ALIAS="$META_NAME-$META_VERSION"
+ test -n "$META_RELEASE" && META_ALIAS="$META_ALIAS-$META_RELEASE"
+ AC_DEFINE_UNQUOTED([META_ALIAS], ["$META_ALIAS"],
+ [Define the project alias string (name-ver or name-ver-rel).]
+ )
+ AC_SUBST([META_ALIAS])
+ fi
+
+ META_DATE=_X_AC_META_GETVAL([DATE]);
+ if test -n "$META_DATE"; then
+ AC_DEFINE_UNQUOTED([META_DATE], ["$META_DATE"],
+ [Define the project release date.]
+ )
+ AC_SUBST([META_DATE])
+ fi
+
+ META_AUTHOR=_X_AC_META_GETVAL([AUTHOR]);
+ if test -n "$META_AUTHOR"; then
+ AC_DEFINE_UNQUOTED([META_AUTHOR], ["$META_AUTHOR"],
+ [Define the project author.]
+ )
+ AC_SUBST([META_AUTHOR])
+ fi
+
+ m4_pattern_allow([^LT_(CURRENT|REVISION|AGE)$])
+ META_LT_CURRENT=_X_AC_META_GETVAL([LT_CURRENT]);
+ META_LT_REVISION=_X_AC_META_GETVAL([LT_REVISION]);
+ META_LT_AGE=_X_AC_META_GETVAL([LT_AGE]);
+ if test -n "$META_LT_CURRENT" \
+ -o -n "$META_LT_REVISION" \
+ -o -n "$META_LT_AGE"; then
+ test -n "$META_LT_CURRENT" || META_LT_CURRENT="0"
+ test -n "$META_LT_REVISION" || META_LT_REVISION="0"
+ test -n "$META_LT_AGE" || META_LT_AGE="0"
+ AC_DEFINE_UNQUOTED([META_LT_CURRENT], ["$META_LT_CURRENT"],
+ [Define the libtool library 'current' version information.]
+ )
+ AC_DEFINE_UNQUOTED([META_LT_REVISION], ["$META_LT_REVISION"],
+ [Define the libtool library 'revision' version information.]
+ )
+ AC_DEFINE_UNQUOTED([META_LT_AGE], ["$META_LT_AGE"],
+ [Define the libtool library 'age' version information.]
+ )
+ AC_SUBST([META_LT_CURRENT])
+ AC_SUBST([META_LT_REVISION])
+ AC_SUBST([META_LT_AGE])
+ fi
+ fi
+
+ AC_MSG_RESULT([$_x_ac_meta_got_file])
+ ]
+)
+
+AC_DEFUN([_X_AC_META_GETVAL],
+ [`perl -n\
+ -e "BEGIN { \\$key=shift @ARGV; }"\
+ -e "next unless s/^\s*\\$key@<:@:=@:>@//i;"\
+ -e "s/^((?:@<:@^'\"#@:>@*(?:(@<:@'\"@:>@)@<:@^\2@:>@*\2)*)*)#.*/\\@S|@1/;"\
+ -e "s/^\s+//;"\
+ -e "s/\s+$//;"\
+ -e "s/^(@<:@'\"@:>@)(.*)\1/\\@S|@2/;"\
+ -e "\\$val=\\$_;"\
+ -e "END { print \\$val if defined \\$val; }"\
+ '$1' $META`]dnl
+)
--- /dev/null
+man_MANS = \
+ ras-mc-ctl.8
+
--- /dev/null
+.\"****************************************************************************
+.\" $Id$
+.\"****************************************************************************
+.\" Copyright (C) 2006-2007 The Regents of the University of California.
+.\" Produced at Lawrence Livermore National Laboratory.
+.\" Written by Mark Grondona <mgrondona@llnl.gov>
+.\" UCRL-CODE-230739.
+.\"
+.\" This file is part of edac-utils.
+.\"
+.\" This is free software; you can redistribute it and/or modify it
+.\" under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; either version 2 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" This is distributed in the hope that it will be useful, but WITHOUT
+.\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+.\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+.\" for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License along
+.\" with this program; if not, write to the Free Software Foundation, Inc.,
+.\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+.\"****************************************************************************
+
+.TH EDAC-CTL 8 "@META_DATE@" "@META_ALIAS@" "EDAC admin utility"
+
+.SH NAME
+edac-ctl \- EDAC admin utility
+
+.SH SYNOPSIS
+.B edac-ctl
+[\fIOPTION\fR]...
+
+.SH DESCRIPTION
+
+The \fBedac-ctl\fR program is a \fBperl\fR(1) script which performs
+some useful administration tasks for EDAC (Error Detection and Correction)
+drivers.
+
+.SH OPTIONS
+.TP
+.BI "--help"
+Display a brief usage message.
+.TP
+.BI "--mainboard"
+Print mainboard vendor and model for this hardware, if available.
+The method used by \fBedac-ctl\fR to obtain the mainboard vendor
+and model information for the current system is described below
+in the \fIMAINBOARD CONFIGURATION\fR section.
+.TP
+.BI "--status"
+Print the status of EDAC drivers (loaded or unloaded).
+.TP
+.BI "--register-labels"
+Register motherboard DIMM labels into EDAC driver sysfs files.
+This option uses the detected mainboard manufacturer and model
+number in combination with a "labels database" found in any
+of the files under /etc/edac/labels.d/* or in the labels.db file
+at /etc/edac/labels.db. An entry for the current hardware must
+exist in the labels database for this option to do anything.
+.TP
+.BI "--print-labels"
+Display the configured labels for the current hardware, as
+well as the current labels registered with EDAC.
+.TP
+.BI "--labeldb="DB
+Specify an alternate location for the labels database.
+
+.SH MAINBOARD CONFIGURATION
+.PP
+The \fBedac-ctl\fR script uses the following method to determine the
+current system's mainboard vendor and model information:
+
+.IP "1." 4
+If the config file @sysconfdir@/edac/mainboard exists, then it is
+parsed by \fBedac-ctl\fR. The mainboard config file has the following
+simple syntax:
+.nf
+
+ vendor = <mainboard vendor string>
+ model = <mainboard model string>
+ script = <script to gather mainboard information>
+
+.fi
+Where anything after a '#' character on a line is considered a comment.
+If the keyword \fBscript\fR is specified, then that script or
+executable is run by \fBedac-ctl\fR to gather the mainboard vendor
+and model information. The script should write the resulting information
+on stdout in the same format as the mainboard config file.
+
+.IP "2."
+If no mainboard config file exists, then \fBedac-ctl\fR will attempt
+to read DMI information from the sysfs files
+.nf
+
+ /sys/class/dmi/id/board_vendor
+ /sys/class/dmi/id/board_name
+
+.fi
+
+.IP "3."
+If the sysfs files above do not exist, then \fBedac-ctl\fR will fall
+back to parsing output of the \fBdmidecode\fR(8) utility. Use of this
+utility will most often require that \fBedac-ctl\fR be run as root.
+.EL
+
+.SH SEE ALSO
+\fBedac\fR(3), \fBedac-util\fR(1)
+