diff mbox

[RFC,v2,5/7] ndctl: nvdimmd: add nvdimmd config file

Message ID 20171114074704.3446-6-qi.fuli@jp.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

QI Fuli Nov. 14, 2017, 7:47 a.m. UTC
This patch adds nvdimmd.conf.
Autotools to install the config file for nvdimmd service.
The nvdimmd.conf includs the following parameters.
   - LOGFILE: Users can choose either to write the notifications into syslog
     (LOGFILE=syslog), or to send into a special file under /var/log/nvdimmd/
     (such as LOGFILE=nvdimmd.log) by configuring LOGFILE parameter in the
     config file.
   - LOGFORMAT: Users can choose the format of notification to be structured
     json(LOGFORMAT=json) or text(LOGFORMAT=text) by configuring LOGFORMAT
     parameter in the config file.
   - MONITORDIMM: The dimms to monitor are filtered via dimm's name by setting
     MONITORDIMM parameter in the config file. When setting up multiple dimms,
     the names of dimms should be separated by ",".(MONITORDIMM=nmem0,nmem1,nmem2)
   - MONITORBUS: The dimms to monitor are filtered via its parent bus by setting
     MONITORBUS parameter as well. When setting up multiple dimms, the names of
     buses should be separated by "," (MONITORBUS=ndbus0,ndbus1)
The nvdimmd.conf would be read when nvdimmd service starts. Users need to restart
nvdimmd service after changing the value of paramaters in nvdimmd.conf.

Signed-off-by: QI Fuli <qi.fuli@jp.fujitsu.com>
---
 nvdimmd/Makefile.am  |  9 +++++++++
 nvdimmd/nvdimmd.conf | 25 +++++++++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 nvdimmd/nvdimmd.conf
diff mbox

Patch

diff --git a/nvdimmd/Makefile.am b/nvdimmd/Makefile.am
index 9883edd..6716547 100644
--- a/nvdimmd/Makefile.am
+++ b/nvdimmd/Makefile.am
@@ -17,3 +17,12 @@  nvdimmd_LDADD = ../ndctl/lib/libndctl.la \
 		$(JSON_LIBS) \
 		$(UUID_LIBS) \
 		$(UDEV_LIBS)
+
+conffiles = nvdimmd.conf
+
+confdir = /etc/nvdimmd/
+
+conf_DATA = $(conffiles)
+
+EXTRA_DIST =\
+	$(conffiles)
diff --git a/nvdimmd/nvdimmd.conf b/nvdimmd/nvdimmd.conf
new file mode 100644
index 0000000..4e6a12a
--- /dev/null
+++ b/nvdimmd/nvdimmd.conf
@@ -0,0 +1,25 @@ 
+# This is the main Nvdimm daemon configuration file. It contains the
+# configuration directives that give nvdimmd its instructions.
+# You can change settings by editing this file.
+# The changed item will work after restart nvdimmd service.
+# In this file, lines starting with a hash (#) are comments.
+# The following charecters are not allowed the value: : # ? / \ % " '
+
+# LOGFILE: Users can choose either to write the notifications into syslog
+# (LOGFILE=syslog), or to send into a special file under /var/log/nvdimmd/
+# (such as LOGFILE=nvdimmd.log) by setting LOGFILE.
+LOGFILE=nvdimmd.log
+
+# LOGFORMAT: Users can choose the format of notification to be json
+# (LOGFORMAT=json) or text(LOGFORMAT=text) by setting LOGFORMAT.
+LOGFORMAT = json
+
+# MONITORDIMM: The dimms to monitor are filtered via dimm's name by setting
+# MONITORDIMM. When setting up mutiple dimms, the names of dimms should be
+# separated by ",".(MONITORDIMM=nmem0,nmem1,nmem2)
+MONITORDIMM=all
+
+# MONITORBUS: The dimms to monitor are filtered via its parent bus by
+# setting as well. When setting up mutiple dimms, the names of buses
+# should be seprated by "," (MONITORBUS=ndbus0,ndbus1)
+MONITORBUS=all