nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: QI Fuli <qi.fuli@jp.fujitsu.com>
To: linux-nvdimm@lists.01.org
Cc: tokunaga.keiich@jp.fujitsu.com
Subject: [ndctl PATCH v13 0/5] ndctl, monitor: add ndctl monitor daemon
Date: Sat, 14 Jul 2018 08:33:45 +0900	[thread overview]
Message-ID: <20180713233350.7148-1-qi.fuli@jp.fujitsu.com> (raw)

This is the v13 patch for ndctl monitor, a tiny daemon to monitor
the smart events of nvdimm DIMMs. Since NVDIMM does not have a
feature like mirroring, if it breaks down, the data will be
impossible to restore. Ndctl monitor daemon will catch the smart
events notify from firmware and outputs notification to logfile,
therefore users can replace NVDIMM before it is completely broken.

Signed-off-by: QI Fuli <qi.fuli@jp.fujitsu.com>
Change log since v12:
 - Fixing log_fn() for removing output new line
 - Fixing hard code default configuration file path
 - Fixing RPM spec file for configuration file and systemd unit file
 - Fixing man page

Change log since v11:
 - Adding log_standard()
 - Adding [-u | --human] option
 - Fixing man page
 - Refactoring unit test
 - Updating configuration file and systemd unit file to RPM spec file

Change log since v10:
 - Adding unit test
 - Adding fflush to log_file()

Change log since v9:
 - Replacing ndctl_cmd_smart_get_event_flags() with
 - Adding ndctl_dimm_get_health() api
 - Adding ndctl_dimm_get_flags() api
 - Adding ndctl_dimm_is_flag_supported api
 - Adding manpage

Change log since v8:
 - Adding ndctl_cmd_smart_get_event_flags() api
 - Adding monitor_filter_arg to the union in util_filter_ctx
 - Removing is_dir()
 - Replacing malloc + vsprintf with vasprintf() in log_file() and log_syslog()
 - Adding parse_monitor_event()
 - Refactoring util_dimm_event_filter()
 - Adding event_flags to monitor
 - Refactoring dimm_event_to_json()
 - Adding check_dimm_supported_threshold_alarms()
 - Fixing fail token

Change log since v7:
 - Replacing logreport() with log_file() and log_syslog()
 - Refactoring read_config_file()
 - Replacing set_confile() with parse_config()
 - Fixing the ndctl/ndct.conf file

Change log since v6:
 - Changing License to GPL-2.0
 - Adding event object to output notification
 - Adding [--dimm-event] option to filter notification by event type
 - Rewriting read_config_file()
 - Replacing monitor_dimm_event() with monitor_event()
 - Renaming some variables

Change log since v5:
 - Fixing systemd unit file cannot be installed bug
 - Adding license to ./util/abspath.c

Change log since v4:
 - Adding OPTION_FILENAME to make sure filename is correct
 - Adding configuration file
 - Adding [--config-file] option to override the default configuration
 - Making some options support multiple space-seperated arguments
 - Making systemctl enable ndctl-monitor.service command work
 - Making systemctl restart ndctl-monitor.service command work
 - Making the directory of systemd unit file to be configurable
 - Changing log_file() and log_syslog() to logreport()
 - Changing date format in notification to nanoseconds since epoch
 - Changing select() to epoll()
 - Adding filter_bus() and filter_region()

Change log since v3:
 - Removing create-monitor, show-monitor, list-monitor, destroy-monitor
 - Adding [--daemon] option to run ndctl monitor as a daemon 
 - Using systemd to manage ndctl monitor daemon
 - Replacing filter_monitor_dimm() with filter_dimm()

Change log since v2:
 - Changing the interface of daemon to the ndctl command line
 - Changing the name of daemon form "nvdimmd" to "monitor"
 - Removing the config file, unit_file, nvdimmd dir
 - Removing nvdimmd_test program
 - Adding ndctl/monitor.c

Change log since v1:
 - Adding a config file(/etc/nvdimmd/nvdimmd.conf)
 - Using struct log_ctx instead of syslog()
    - Using log_syslog() to save the notify messages to syslog
    - Using log_file() to save the notify messages to special file
 - Adding LOG_NOTICE level to log_priority
 - Using automake instead of Makefile
 - Adding a new util file(nvdimmd/util.c) including helper functions
   needed for nvdimm daemon
 - Adding nvdimmd_test program

QI Fuli (5):
  ndctl, monitor: add a new command - monitor
  ndctl, monitor: add main ndctl monitor configuration file
  ndctl, monitor: add the unit file of systemd for ndctl-monitor service
  ndctl, documentation: add man page for monitor
  ndctl, test: add a new unit test for monitor

 .gitignore                            |   1 +
 Documentation/ndctl/Makefile.am       |   3 +-
 Documentation/ndctl/ndctl-monitor.txt | 108 +++++
 autogen.sh                            |   3 +-
 builtin.h                             |   1 +
 configure.ac                          |  23 +
 ndctl.spec.in                         |   3 +
 ndctl/Makefile.am                     |  12 +-
 ndctl/lib/libndctl.c                  |  82 ++++
 ndctl/lib/libndctl.sym                |   4 +
 ndctl/libndctl.h                      |  10 +
 ndctl/monitor.c                       | 650 ++++++++++++++++++++++++++
 ndctl/monitor.conf                    |  41 ++
 ndctl/ndctl-monitor.service           |   7 +
 ndctl/ndctl.c                         |   1 +
 test/Makefile.am                      |  14 +-
 test/list-smart-dimm.c                | 117 +++++
 test/monitor.sh                       | 176 +++++++
 util/filter.h                         |   9 +
 19 files changed, 1260 insertions(+), 5 deletions(-)
 create mode 100644 Documentation/ndctl/ndctl-monitor.txt
 create mode 100644 ndctl/monitor.c
 create mode 100644 ndctl/monitor.conf
 create mode 100644 ndctl/ndctl-monitor.service
 create mode 100644 test/list-smart-dimm.c
 create mode 100755 test/monitor.sh


Linux-nvdimm mailing list

             reply	other threads:[~2018-07-13 23:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-13 23:33 QI Fuli [this message]
2018-07-13 23:33 ` [ndctl PATCH v13 1/5] ndctl, monitor: add a new command - monitor QI Fuli
2018-07-13 23:33 ` [ndctl PATCH v13 2/5] ndctl, monitor: add main ndctl monitor configuration file QI Fuli
2018-10-16  0:23   ` Dan Williams
2018-10-16  4:09     ` qi.fuli
2018-11-05  8:05       ` qi.fuli
2018-07-13 23:33 ` [ndctl PATCH v13 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service QI Fuli
2018-07-13 23:33 ` [ndctl PATCH v13 4/5] ndctl, documentation: add man page for monitor QI Fuli
2018-07-13 23:33 ` [ndctl PATCH v13 5/5] ndctl, test: add a new unit test " QI Fuli
2018-07-19  0:42 ` [ndctl PATCH v13 0/5] ndctl, monitor: add ndctl monitor daemon Verma, Vishal L
2018-07-19  1:02   ` Qi, Fuli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180713233350.7148-1-qi.fuli@jp.fujitsu.com \
    --to=qi.fuli@jp.fujitsu.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=tokunaga.keiich@jp.fujitsu.com \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).