From patchwork Fri Jul 13 15:54:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: QI Fuli X-Patchwork-Id: 10523669 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 91FE36028E for ; Fri, 13 Jul 2018 15:54:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80EC429D48 for ; Fri, 13 Jul 2018 15:54:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7574D29D59; Fri, 13 Jul 2018 15:54:57 +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 F39DC29D48 for ; Fri, 13 Jul 2018 15:54:56 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id CDE6920988759; Fri, 13 Jul 2018 08:54:56 -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.170; helo=mgwkm03.jp.fujitsu.com; envelope-from=qi.fuli@jp.fujitsu.com; receiver=linux-nvdimm@lists.01.org Received: from mgwkm03.jp.fujitsu.com (mgwkm03.jp.fujitsu.com [202.219.69.170]) (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 DAF1D21CAD9BA for ; Fri, 13 Jul 2018 08:54:54 -0700 (PDT) Received: from kw-mxoi2.gw.nic.fujitsu.com (unknown [192.168.231.133]) by mgwkm03.jp.fujitsu.com with smtp id 5259_5f34_33b476d2_c921_43b2_9ba2_10a90fb9df66; Sat, 14 Jul 2018 00:54:48 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by kw-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id B76E4AC0211 for ; Sat, 14 Jul 2018 00:54:47 +0900 (JST) Received: from qi-fedora.fujitsu.com (unknown [10.124.196.110]) by m3051.s.css.fujitsu.com (Postfix) with ESMTP id 8FE8D2C4; Sat, 14 Jul 2018 00:54:47 +0900 (JST) From: QI Fuli To: linux-nvdimm@lists.01.org Subject: [ndctl PATCH v12 4/5] ndctl, documentation: add man page for monitor Date: Sat, 14 Jul 2018 00:54:02 +0900 Message-Id: <20180713155403.30020-5-qi.fuli@jp.fujitsu.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180713155403.30020-1-qi.fuli@jp.fujitsu.com> References: <20180713155403.30020-1-qi.fuli@jp.fujitsu.com> X-TM-AS-MML: disable X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tokunaga.keiich@jp.fujitsu.com MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP This patch is used to add man page for ndctl monitor command. Signed-off-by: QI Fuli --- Documentation/ndctl/Makefile.am | 3 +- Documentation/ndctl/ndctl-monitor.txt | 104 ++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 Documentation/ndctl/ndctl-monitor.txt diff --git a/Documentation/ndctl/Makefile.am b/Documentation/ndctl/Makefile.am index 4fd9636..a30b139 100644 --- a/Documentation/ndctl/Makefile.am +++ b/Documentation/ndctl/Makefile.am @@ -46,7 +46,8 @@ man1_MANS = \ ndctl-inject-error.1 \ ndctl-inject-smart.1 \ ndctl-update-firmware.1 \ - ndctl-list.1 + ndctl-list.1 \ + ndctl-monitor.1 CLEANFILES = $(man1_MANS) diff --git a/Documentation/ndctl/ndctl-monitor.txt b/Documentation/ndctl/ndctl-monitor.txt new file mode 100644 index 0000000..4f1803e --- /dev/null +++ b/Documentation/ndctl/ndctl-monitor.txt @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: GPL-2.0 + +ndctl-monitor(1) +================ + +NAME +---- +ndctl-monitor - Monitor the smart events of nvdimm objects + +SYNOPSIS +-------- +[verse] +'ndctl monitor' [] + +DESCRIPTION +----------- +Ndctl monitor is used for monitoring the smart events of nvdimm +objects and dumping the json format notifications to syslog, standard +output or a logfile. + +The objects to monitor and smart events to notify can be selected by +setting options and/or the default configuration file +(/etc/ndctl/monitor.conf). Both of the values in configuration file +and in options will work. If there is a conflict, the values in +options will override the values in configuration file. The changed +values in configuration file will work after the monitor is restarted. + +The smart threshold evnet alarm of dimm will be turned on when the +monitor gets started, if it is set off. + +EXAMPLES +-------- + +Run a monitor as a daemon to monitor DIMMs on bus "nfit_test.1" +[verse] +ndctl monitor --bus nfit_test.1 --daemon + +Run a monitor as a one-shot command and output the notifications to +/var/log/ndctl.log +[verse] +ndctl monitor -log /var/log/ndctl.log + +Run a monitor daemon as a system service +[verse] +systemctl start ndctl-monitor.service + +OPTIONS +------- +-b:: +--bus=:: + Enforce that the operation only be carried on devices that are + attached to the given bus. Where 'bus' can be a provider name + or a bus id number. + +-d:: +--dimm=:: + A 'nmemX' device name, or dimm id number. Select the devices to + monitor reference the given dimm. + +-r:: +--region=:: + A 'regionX' device name, or a region id number. The keyword 'all' + can be specified to carry out the operation on every region in + the system, optionally filtered by bus id (see --bus= option). + +-n:: +--namespace=:: + A 'namespaceX.Y' device name, or namespace region plus id tuple + 'X.Y'. + +-l :: +--log=:: + Output notifications to , syslog or standard output. + +--daemon:: + Run a monitor as a daemon. + +-D:: +--dimm-event=:: + Name of an smart health event from the following: + - "dimm-spares-remaining": Spare Blocks Remaining value has gone + below the pre-programmed threshold. + - "dimm-media-temperature": NVDIMM Media temperature value has + gone above the pre-programmed threshold. + - "dimm-controller-temperature": NVDIMM Controller temperature + value has gone above the pre-programmed threshold. + - "dimm-health-state": NVDIMM Normal Health Status has changed + - "dimm-unclean-shutdown": NVDIMM Last Shutdown Status was a + unclean shutdown. +-u:: +--human:: + Output monitor notification as human friendly json format instead + of the default machine friendly json format. + +COPYRIGHT +--------- +Copyright (c) 2018, FUJITSU LIMITED. License GPLv2: GNU GPL version 2 +. This is free software: you are +free to change and redistribute it. There is NO WARRANTY, to the +extent permitted by law. + +SEE ALSO +-------- +linkndctl:ndctl-list[1], linkndctl:ndctl-inject-smart[1]