From patchwork Tue Nov 14 07:47:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: QI Fuli X-Patchwork-Id: 10057097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 34FB8602A7 for ; Tue, 14 Nov 2017 07:47:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1225D28F97 for ; Tue, 14 Nov 2017 07:47:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0742928FD0; Tue, 14 Nov 2017 07:47:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B2B5028F97 for ; Tue, 14 Nov 2017 07:47:22 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 1717B220D4BE3; Mon, 13 Nov 2017 23:43:15 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=211.128.242.42; helo=mgwym03.jp.fujitsu.com; envelope-from=qi.fuli@jp.fujitsu.com; receiver=linux-nvdimm@lists.01.org Received: from mgwym03.jp.fujitsu.com (mgwym03.jp.fujitsu.com [211.128.242.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id BCEA22035A7DA for ; Mon, 13 Nov 2017 23:43:13 -0800 (PST) Received: from yt-mxoi1.gw.nic.fujitsu.com (unknown [192.168.229.67]) by mgwym03.jp.fujitsu.com with smtp id 100e_2b08_f090a90f_fc6e_4042_af67_cdb31edf9c1c; Tue, 14 Nov 2017 16:47:13 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by yt-mxoi1.gw.nic.fujitsu.com (Postfix) with ESMTP id 87540AC0113 for ; Tue, 14 Nov 2017 16:47:13 +0900 (JST) Received: from qi-fedora.fujitsu.com (unknown [10.124.196.110]) by m3051.s.css.fujitsu.com (Postfix) with ESMTP id 739171BB; Tue, 14 Nov 2017 16:47:13 +0900 (JST) From: QI Fuli To: linux-nvdimm@lists.01.org Subject: [RFC PATCH v2 5/7] ndctl: nvdimmd: add nvdimmd config file Date: Tue, 14 Nov 2017 16:47:02 +0900 Message-Id: <20171114074704.3446-6-qi.fuli@jp.fujitsu.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20171114074704.3446-1-qi.fuli@jp.fujitsu.com> References: <20171114074704.3446-1-qi.fuli@jp.fujitsu.com> X-TM-AS-MML: disable X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP 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 --- nvdimmd/Makefile.am | 9 +++++++++ nvdimmd/nvdimmd.conf | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 nvdimmd/nvdimmd.conf 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