From patchwork Thu Apr 26 11:30:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: QI Fuli X-Patchwork-Id: 10365665 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 16A16602DC for ; Thu, 26 Apr 2018 11:33:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 057A828CCA for ; Thu, 26 Apr 2018 11:33:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EE74D2908A; Thu, 26 Apr 2018 11:33:31 +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=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, 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 778A228CCA for ; Thu, 26 Apr 2018 11:33:31 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 70B332035D6D4; Thu, 26 Apr 2018 04:33:31 -0700 (PDT) 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=202.219.69.168; helo=mgwkm01.jp.fujitsu.com; envelope-from=qi.fuli@jp.fujitsu.com; receiver=linux-nvdimm@lists.01.org Received: from mgwkm01.jp.fujitsu.com (mgwkm01.jp.fujitsu.com [202.219.69.168]) (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 A1C082035D6CC for ; Thu, 26 Apr 2018 04:33:29 -0700 (PDT) Received: from kw-mxoi2.gw.nic.fujitsu.com (unknown [192.168.231.133]) by mgwkm01.jp.fujitsu.com with smtp id 31a3_4e64_817fd621_2a6b_496d_930a_231c02f264ad; Thu, 26 Apr 2018 20:33:26 +0900 Received: from m3050.s.css.fujitsu.com (msm.b.css.fujitsu.com [10.134.21.208]) by kw-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id B74E9AC03E4 for ; Thu, 26 Apr 2018 20:33:25 +0900 (JST) Received: from qi-fedora.fujitsu.com (unknown [10.124.196.110]) by m3050.s.css.fujitsu.com (Postfix) with ESMTP id 94B76565; Thu, 26 Apr 2018 20:33:25 +0900 (JST) From: QI Fuli To: linux-nvdimm@lists.01.org Subject: [PATCH v5 3/4] ndctl, monitor: add default configuration file Date: Thu, 26 Apr 2018 20:30:49 +0900 Message-Id: <20180426113050.11424-4-qi.fuli@jp.fujitsu.com> X-Mailer: git-send-email 2.17.0.140.g0b0cc9f86 In-Reply-To: <20180426113050.11424-1-qi.fuli@jp.fujitsu.com> References: <20180426113050.11424-1-qi.fuli@jp.fujitsu.com> X-TM-AS-MML: disable X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.26 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 the default configuration file of ndctl monitor. Users can change the configuration of ndctl monitor by editing this file or by using [--config-file=] option to override this one. The monitor started by systemd follows the configuration in this file. Signed-off-by: QI Fuli --- ndctl/Makefile.am | 5 +++++ ndctl/monitor.conf | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 ndctl/monitor.conf diff --git a/ndctl/Makefile.am b/ndctl/Makefile.am index 7dbf223..ae3d894 100644 --- a/ndctl/Makefile.am +++ b/ndctl/Makefile.am @@ -42,3 +42,8 @@ ndctl_SOURCES += ../test/libndctl.c \ ../test/multi-pmem.c \ ../test/core.c endif + +monitor_config_file = monitor.conf +monitor_configdir = /etc/ndctl/ +monitor_config_DATA = $(monitor_config_file) +EXTRA_DIST += $(monitor_config_file) diff --git a/ndctl/monitor.conf b/ndctl/monitor.conf new file mode 100644 index 0000000..13ad7b0 --- /dev/null +++ b/ndctl/monitor.conf @@ -0,0 +1,37 @@ +# This is the main ndctl monitor configuration file. It contains the +# configuration directives that give ndctl monitor instructions. +# You can change the configuration of ndctl monitor by editing this +# file or by using [--config-file=] option to override this one. +# The changed value will work after restart ndctl monitor service. + +# In this file, lines starting with a hash (#) are comments. +# The configurations shold follow = style. +# Multiple space-seperated values are allowed, but except the following +# charecters: : # ? / \ % " ' + +# The dimms to monitor are filtered via dimm's name by setting key "dimm". +# If this value is different from the value of [--dimm=] option, +# both of the values will work. +# dimm = all + +# The dimms to monitor are filtered via its parent bus by setting key "bus". +# If this value is different from the value of [--bus=] option, +# both of the values will work. +# bus = all + +# The dimms to monitor are filtered via region by setting key "region". +# If this value is different from the value of [--namespace=] option, +# both of the values will work. +# region = all + +# The dimms to monitor are filtered via namespace by setting key "namespace". +# If this value is different from the value of [--namespace=] option, +# both of the values will work. +# namespace = all + +# Users can choose to output the notifications to syslog (logfile=syslog), +# stderr (logfile=stderr) or to write into a special file (logfile=) +# by setting key "logfile". +# If this value is in conflict with the value of [--logfile=] option, +# this value will be ignored. +# logfile = /var/log/ndctl/monitor.log