From patchwork Mon May 7 05:09:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: QI Fuli X-Patchwork-Id: 10383223 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 306DB6037F for ; Mon, 7 May 2018 05:10:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22100289F2 for ; Mon, 7 May 2018 05:10:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 209B428A1E; Mon, 7 May 2018 05:10:27 +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 C040B289F2 for ; Mon, 7 May 2018 05:10:26 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 340942096106B; Sun, 6 May 2018 22:10:26 -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=211.128.242.41; helo=mgwym02.jp.fujitsu.com; envelope-from=qi.fuli@jp.fujitsu.com; receiver=linux-nvdimm@lists.01.org Received: from mgwym02.jp.fujitsu.com (mgwym02.jp.fujitsu.com [211.128.242.41]) (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 EE8E82279CF0A for ; Sun, 6 May 2018 22:10:23 -0700 (PDT) Received: from yt-mxauth.gw.nic.fujitsu.com (unknown [192.168.229.68]) by mgwym02.jp.fujitsu.com with smtp id 240a_4f0a_40d4c2fe_d0dc_4572_85e2_2ff614d7568a; Mon, 07 May 2018 14:10:16 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by yt-mxauth.gw.nic.fujitsu.com (Postfix) with ESMTP id 3D6EFAC01B1 for ; Mon, 7 May 2018 14:10:16 +0900 (JST) Received: from qi-fedora.fujitsu.com (unknown [10.124.196.110]) by m3051.s.css.fujitsu.com (Postfix) with ESMTP id F2E06A9; Mon, 7 May 2018 14:10:15 +0900 (JST) From: QI Fuli To: linux-nvdimm@lists.01.org Subject: [PATCH v6 3/4] ndctl, monitor: add default configuration file Date: Mon, 7 May 2018 14:09:25 +0900 Message-Id: <20180507050926.17243-4-qi.fuli@jp.fujitsu.com> X-Mailer: git-send-email 2.17.0.140.g0b0cc9f86 In-Reply-To: <20180507050926.17243-1-qi.fuli@jp.fujitsu.com> References: <20180507050926.17243-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 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