Skip to contentSkip to conversation

ndctl, monitor: add ndctl monitor daemon

PATCH In review QI Fuli 4 participants 11 messages Jul 13, 2018 – Nov 5, 2018

Subsystems (2)
lore
Share & tools
lore

QI Fuli

author
#0 lore raw

v13 cover ndctl, monitor: add ndctl monitor daemon

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.

---
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 ndctl_dimm_get_event_flags()
- 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
Signature · 7 lines
2.18.0


_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
author
#1 lore raw

PATCH v13 1/5 ndctl, monitor: add a new command - monitor

Ndctl monitor is used for monitoring the smart events of NVDIMMs. When a smart event fires, monitor will output the notifications which include dimm health status and event information to syslog, standard output or a file by setting [--log] option. The notifications follow json format and can be consumed by log collectors like Fluentd.

The objects to monitor can be selected by setting [--dimm] [--region] [--namespace] [--bus] options and the event type can be filtered by setting [--dimm-event] option. These options support multiple space-separated arguments.

Ndctl monitor can be forked as a daemon by using [--daemon] option, such as:

   # ndctl monitor --daemon --log /var/log/ndctl/monitor.log
---
 builtin.h              |   1 +
 ndctl/Makefile.am      |   3 +-
 ndctl/lib/libndctl.c   |  82 +++++++
 ndctl/lib/libndctl.sym |   4 +
 ndctl/libndctl.h       |  10 +
 ndctl/monitor.c        | 542 +++++++++++++++++++++++++++++++++++++++++
 ndctl/ndctl.c          |   1 +
 util/filter.h          |   9 +
 8 files changed, 651 insertions(+), 1 deletion(-)
 create mode 100644 ndctl/monitor.c
builtin.h +1 -0
index d3cc723..675a6ce 100644
@@ -39,6 +39,7 @@ int cmd_inject_error(int argc, const char **argv, void *ctx);
 int cmd_wait_scrub(int argc, const char **argv, void *ctx);
 int cmd_start_scrub(int argc, const char **argv, void *ctx);
 int cmd_list(int argc, const char **argv, void *ctx);
+int cmd_monitor(int argc, const char **argv, void *ctx);
 #ifdef ENABLE_TEST
 int cmd_test(int argc, const char **argv, void *ctx);
 #endif
ndctl/Makefile.am +2 -1
index 0f56871..083609a 100644
@@ -15,7 +15,8 @@ ndctl_SOURCES = ndctl.c \
 		util/json-smart.c \
 		util/json-firmware.c \
 		inject-error.c \
-		inject-smart.c
+		inject-smart.c \
+		monitor.c
 
 if ENABLE_DESTRUCTIVE
 ndctl_SOURCES += ../test/blk_namespaces.c \
ndctl/lib/libndctl.c +82 -0

88 lines not on this page · raw message

ndctl/lib/libndctl.sym +4 -0
index 8932ef6..9b36960 100644
@@ -371,4 +371,8 @@ global:
 LIBNDCTL_17 {
 global:
 	ndctl_dimm_smart_inject_supported;
+	ndctl_dimm_get_health;
+	ndctl_dimm_get_flags;
+	ndctl_dimm_get_event_flags;
+	ndctl_dimm_is_flag_supported;
 } LIBNDCTL_16;
ndctl/libndctl.h +10 -0
index 8a96c84..6a6bb0d 100644
@@ -73,6 +73,12 @@ typedef unsigned char uuid_t[16];
 extern "C" {
 #endif
 
+#define ND_EVENT_SPARES_REMAINING	(1 << 0)
+#define ND_EVENT_MEDIA_TEMPERATURE	(1 << 1)
+#define ND_EVENT_CTRL_TEMPERATURE	(1 << 2)
+#define ND_EVENT_HEALTH_STATE		(1 << 3)
+#define ND_EVENT_UNCLEAN_SHUTDOWN	(1 << 4)
+
 size_t ndctl_min_namespace_size(void);
 size_t ndctl_sizeof_namespace_index(void);
 size_t ndctl_sizeof_namespace_label(void);
@@ -170,6 +176,10 @@ int ndctl_dimm_failed_map(struct ndctl_dimm *dimm);
 int ndctl_dimm_smart_pending(struct ndctl_dimm *dimm);
 int ndctl_dimm_failed_flush(struct ndctl_dimm *dimm);
 int ndctl_dimm_get_health_eventfd(struct ndctl_dimm *dimm);
+unsigned int ndctl_dimm_get_health(struct ndctl_dimm *dimm);
+unsigned int ndctl_dimm_get_flags(struct ndctl_dimm *dimm);
+unsigned int ndctl_dimm_get_event_flags(struct ndctl_dimm *dimm);
+int ndctl_dimm_is_flag_supported(struct ndctl_dimm *dimm, unsigned int flag);
 unsigned int ndctl_dimm_handle_get_node(struct ndctl_dimm *dimm);
 unsigned int ndctl_dimm_handle_get_socket(struct ndctl_dimm *dimm);
 unsigned int ndctl_dimm_handle_get_imc(struct ndctl_dimm *dimm);
ndctl/monitor.c new file +542 -0

542 lines not on this page · raw message

ndctl/ndctl.c +1 -0
index 7daadeb..73dabfa 100644
@@ -89,6 +89,7 @@ static struct cmd_struct commands[] = {
 	{ "wait-scrub", cmd_wait_scrub },
 	{ "start-scrub", cmd_start_scrub },
 	{ "list", cmd_list },
+	{ "monitor", cmd_monitor},
 	{ "help", cmd_help },
 	#ifdef ENABLE_TEST
 	{ "test", cmd_test },
util/filter.h +9 -0
index effda24..c2cdddf 100644
@@ -13,6 +13,7 @@
 #ifndef _UTIL_FILTER_H_
 #define _UTIL_FILTER_H_
 #include <stdbool.h>
+#include <ccan/list/list.h>
 
 struct ndctl_bus *util_bus_filter(struct ndctl_bus *bus, const char *ident);
 struct ndctl_region *util_region_filter(struct ndctl_region *region,
@@ -50,6 +51,13 @@ struct list_filter_arg {
 	unsigned long flags;
 };
 
+struct monitor_filter_arg {
+	struct list_head dimms;
+	int maxfd_dimm;
+	int num_dimm;
+	unsigned long flags;
+};
+
 /*
  * struct util_filter_ctx - control and callbacks for util_filter_walk()
  * ->filter_bus() and ->filter_region() return bool because the
@@ -67,6 +75,7 @@ struct util_filter_ctx {
 	union {
 		void *arg;
 		struct list_filter_arg *list;
+		struct monitor_filter_arg *monitor;
 	};
 };
 
Signature · 7 lines
2.18.0


_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
author
#2 lore raw

PATCH v13 2/5 ndctl, monitor: add main ndctl monitor configuration file

In reply to QI Fuli

This patch adds the main configuration file(/etc/ndctl/monitor.conf) of ndctl monitor. It contains the configuration directives that give ndctl monitor instructions. Users can change the configuration by editing this file or using [--config-file] option to override this file. The changed value will work after restart ndctl monitor service.

---
 configure.ac       |   1 +
 ndctl.spec.in      |   1 +
 ndctl/Makefile.am  |   5 +++
 ndctl/monitor.c    | 110 ++++++++++++++++++++++++++++++++++++++++++++-
 ndctl/monitor.conf |  41 +++++++++++++++++
 5 files changed, 157 insertions(+), 1 deletion(-)
 create mode 100644 ndctl/monitor.conf
configure.ac +1 -0
index cf44260..ff0096d 100644
@@ -144,6 +144,7 @@ AC_CHECK_FUNCS([ \
 ])
 
 my_CFLAGS="\
+-D DEF_CONF_FILE='\"${sysconfdir}/ndctl/monitor.conf\"' \
 -Wall \
 -Wchar-subscripts \
 -Wformat-security \
ndctl.spec.in +1 -0
index e2c879c..41a1d59 100644
@@ -116,6 +116,7 @@ make check
 %{_bindir}/ndctl
 %{_mandir}/man1/ndctl*
 %{bashcompdir}/
+%{_sysconfdir}/ndctl/monitor.conf
 
 %files -n daxctl
 %defattr(-,root,root)
ndctl/Makefile.am +5 -0
index 083609a..58b747a 100644
@@ -42,3 +42,8 @@ ndctl_SOURCES += ../test/libndctl.c \
 		 ../test/core.c \
 		 test.c
 endif
+
+monitor_config_file = monitor.conf
+monitor_configdir = $(sysconfdir)/ndctl/
+monitor_config_DATA = $(monitor_config_file)
+EXTRA_DIST += $(monitor_config_file)
ndctl/monitor.c +109 -1

137 lines not on this page · raw message

ndctl/monitor.conf new file +41 -0

41 lines not on this page · raw message

Signature · 7 lines
2.18.0


_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
#3 lore raw

Re: [ndctl PATCH v13 2/5] ndctl, monitor: add main ndctl monitor configuration file

Quoted 8 lines · QI Fuli

This patch adds the main configuration file(/etc/ndctl/monitor.conf) of ndctl monitor. It contains the configuration directives that give ndctl monitor instructions. Users can change the configuration by editing this file or using [--config-file] option to override this file. The changed value will work after restart ndctl monitor service.

[..]

Quoted 4 lines
ndctl/monitor.c +0 -0
index 12317d0..8300250 100644

[..]

Quoted 13 lines
ndctl/monitor.c +9 -0
@@ -454,6 +454,108 @@ dimm_event_all:
        return 0;
 }
 
+static void parse_config(const char **arg, char *key, char *val, char *ident)
+{
+       struct strbuf value = STRBUF_INIT;
+       size_t arg_len = *arg ? strlen(*arg) : 0;
+
+       if (!ident || !key || (strcmp(ident, key) != 0))
+               return;
+
+       if (arg_len) {

ndctl/monitor.c dimm_event_all: · line 475

Quoted 10 lines
ndctl/monitor.c +10 -0
+               strbuf_add(&value, *arg, arg_len);
+               strbuf_addstr(&value, " ");
+       }
+       strbuf_addstr(&value, val);
+       *arg = strbuf_detach(&value, NULL);
+}
+
+static int read_config_file(struct ndctl_ctx *ctx, struct monitor *_monitor,
+               struct util_filter_params *_param)
+{

Hi,

I have a future cleanup request. I've just come across, ciniparser [1]. It would be great if we could drop the open coded implementation and just use that library. We use ccan modules for other portions of ndctl.

[1]: https://ccodearchive.net/info/ciniparser.html
_______________________________________________
Linux-nvdimm mailing list [email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

#4 lore raw

RE: [ndctl PATCH v13 2/5] ndctl, monitor: add main ndctl monitor configuration file

Quoted 8 lines

Hi,

I have a future cleanup request. I've just come across, ciniparser [1]. It would be great if we could drop the open coded implementation and just use that library. We use ccan modules for other portions of ndctl.

[1]: https://ccodearchive.net/info/ciniparser.html

Hi Dan,

It sounds good.
I will study on it a bit and then make a cleanup patch.

Thank you very much.
Qi
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

#5 lore raw

RE: [ndctl PATCH v13 2/5] ndctl, monitor: add main ndctl monitor configuration file

Quoted 9 lines
Quoted 4 lines

Hi,

I have a future cleanup request. I've just come across, ciniparser [1]. It would be great if we could drop the open coded implementation and just

use that library.

Quoted 3 lines

We use ccan modules for other portions of ndctl.

[1]: https://ccodearchive.net/info/ciniparser.html

Quoted 7 lines

Hi Dan,

It sounds good.
I will study on it a bit and then make a cleanup patch.

Thank you very much.
Qi

Hi,

I have finished importing the ccan/ciniparser module and refactoring the read_config_file() in my local branch. But thinking more about that more than one configuration file might be added into ndctl in future, I want to add a common function parse_config_file() into ndctl/util/ to replace read_config_file(). If you agree, I will try to make a patch.

Thank you very much.
QI
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

author
#6 lore raw

PATCH v13 3/5 ndctl, monitor: add the unit file of systemd for ndctl-monitor service

In reply to QI Fuli

This patch adds the systemd unit file for ndctl-monitor service. The systemd unit directory can be configured by setting environment variable "--with-systemd-unit-dir[=DIR]".

A monitor daemon can be started as a system service:

   # systemctl start ndctl-monitor.service
---
 autogen.sh                  |  3 ++-
 configure.ac                | 22 ++++++++++++++++++++++
 ndctl.spec.in               |  2 ++
 ndctl/Makefile.am           |  4 ++++
 ndctl/ndctl-monitor.service |  7 +++++++
 5 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 ndctl/ndctl-monitor.service
autogen.sh +2 -1
index 2a52688..21b0e25 100755
@@ -17,7 +17,8 @@ libdir() {
 
 args="--prefix=/usr \
 --sysconfdir=/etc \
---libdir=$(libdir /usr/lib)"
+--libdir=$(libdir /usr/lib) \
+--with-systemd-unit-dir"
 
 echo
 echo "----------------------------------------------------------------"
configure.ac +22 -0
index ff0096d..e242334 100644
@@ -143,6 +143,27 @@ AC_CHECK_FUNCS([ \
 	secure_getenv\
 ])
 
+PKG_PROG_PKG_CONFIG
+AC_ARG_WITH([systemd-unit-dir],
+	AS_HELP_STRING([--with-systemd-unit-dir[=DIR]],
+		[Directory for systemd service files]),
+	[],
+	[with_systemd_unit_dir=yes])
+
+if test "x$with_systemd_unit_dir" = "xyes"; then
+	def_systemd_unit_dir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
+	if test "x$def_systemd_unit_dir" = "x"; then
+		AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])
+		with_systemd_unit_dir=no
+	else
+		with_systemd_unit_dir="$def_systemd_unit_dir"
+	fi
+fi
+
+AS_IF([test "x$with_systemd_unit_dir" != "xno"],
+	[AC_SUBST([systemd_unitdir], [$with_systemd_unit_dir])])
+AM_CONDITIONAL([ENABLE_SYSTEMD_UNIT_DIR], [test "x$with_systemd_unit_dir" != "xno"])
+
 my_CFLAGS="\
 -D DEF_CONF_FILE='\"${sysconfdir}/ndctl/monitor.conf\"' \
 -Wall \
@@ -185,6 +206,7 @@ AC_MSG_RESULT([
         sysconfdir:             ${sysconfdir}
         libdir:                 ${libdir}
         includedir:             ${includedir}
+	systemd-unit-dir:	${systemd_unitdir}
 
         compiler:               ${CC}
         cflags:                 ${CFLAGS}
ndctl.spec.in +2 -0
index 41a1d59..17152c1 100644
@@ -20,6 +20,7 @@ BuildRequires:	pkgconfig(libudev)
 BuildRequires:	pkgconfig(uuid)
 BuildRequires:	pkgconfig(json-c)
 BuildRequires:	pkgconfig(bash-completion)
+BuildRequires:	systemd
 
 %description
 Utility library for managing the "libnvdimm" subsystem.  The "libnvdimm"
@@ -117,6 +118,7 @@ make check
 %{_mandir}/man1/ndctl*
 %{bashcompdir}/
 %{_sysconfdir}/ndctl/monitor.conf
+%{_unitdir}/ndctl-monitor.service
 
 %files -n daxctl
 %defattr(-,root,root)
ndctl/Makefile.am +4 -0
index 58b747a..0f9bb43 100644
@@ -47,3 +47,7 @@ monitor_config_file = monitor.conf
 monitor_configdir = $(sysconfdir)/ndctl/
 monitor_config_DATA = $(monitor_config_file)
 EXTRA_DIST += $(monitor_config_file)
+
+if ENABLE_SYSTEMD_UNIT_DIR
+systemd_unit_DATA = ndctl-monitor.service
+endif
ndctl/ndctl-monitor.service new file +7 -0
new file mode 100644
index 0000000..44f9326
@@ -0,0 +1,7 @@
+[Unit]
+Description=Ndctl Monitor Daemon
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/ndctl monitor --daemon
+ExecStop=/bin/kill ${MAINPID}
Signature · 7 lines
2.18.0


_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
author
#7 lore raw

PATCH v13 4/5 ndctl, documentation: add man page for monitor

In reply to QI Fuli

This patch is used to add man page for ndctl monitor command.

---
 Documentation/ndctl/Makefile.am       |   3 +-
 Documentation/ndctl/ndctl-monitor.txt | 108 ++++++++++++++++++++++++++
 2 files changed, 110 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/ndctl/ndctl-monitor.txt
Documentation/ndctl/Makefile.am +2 -1
index 4fd9636..a30b139 100644
@@ -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)
 
Documentation/ndctl/ndctl-monitor.txt new file +108 -0

108 lines not on this page · raw message

Signature · 7 lines
2.18.0


_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
author
#8 lore raw

PATCH v13 5/5 ndctl, test: add a new unit test for monitor

In reply to QI Fuli

Add a new unit test to test all options of the monitor command.

---
 .gitignore             |   1 +
 test/Makefile.am       |  14 +++-
 test/list-smart-dimm.c | 117 +++++++++++++++++++++++++++
 test/monitor.sh        | 176 +++++++++++++++++++++++++++++++++++++++++
 4 files changed, 306 insertions(+), 2 deletions(-)
 create mode 100644 test/list-smart-dimm.c
 create mode 100755 test/monitor.sh
.gitignore +1 -0
index 1016b3b..0baace4 100644
@@ -56,3 +56,4 @@ test/smart-notify
 test/fio.job
 test/local-write-0-verify.state
 test/ack-shutdown-count-set
+test/list-smart-dimm
test/Makefile.am +12 -2
index cd451e9..8c55056 100644
@@ -21,7 +21,8 @@ TESTS =\
 	btt-pad-compat.sh \
 	firmware-update.sh \
 	ack-shutdown-count-set \
-	rescan-partitions.sh
+	rescan-partitions.sh \
+	monitor.sh
 
 check_PROGRAMS =\
 	libndctl \
@@ -34,7 +35,8 @@ check_PROGRAMS =\
 	smart-listen \
 	hugetlb \
 	daxdev-errors \
-	ack-shutdown-count-set
+	ack-shutdown-count-set \
+	list-smart-dimm
 
 if ENABLE_DESTRUCTIVE
 TESTS +=\
@@ -151,3 +153,11 @@ multi_pmem_LDADD = \
 		$(UUID_LIBS) \
 		$(KMOD_LIBS) \
 		../libutil.a
+
+list_smart_dimm_SOURCES = \
+		list-smart-dimm.c \
+		../util/json.c
+list_smart_dimm_LDADD = \
+		$(LIBNDCTL_LIB) \
+		$(JSON_LIBS) \
+		../libutil.a
test/list-smart-dimm.c new file +117 -0

117 lines not on this page · raw message

test/monitor.sh new file +176 -0

176 lines not on this page · raw message

Signature · 7 lines
2.18.0


_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm
maintainer
#9 lore raw
In reply to QI Fuli
Quoted 8 lines · QI Fuli

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.

Hi Qi,

This looks great, thank you for all the updates!

I have applied the series to my local tree, and expect to push it out to the pending branch soon. I will also add reviewed-by tags for Dan (with his permission) since he has been integral to the review of this series.

I'm also separately sending out the bash completion updates for the monitor command.

Thank you,

-Vishal
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

author
#10 lore raw
Quoted 28 lines

-----Original Message-----
From: Verma, Vishal L [mailto:[email protected]]
Sent: Thursday, July 19, 2018 9:43 AM
To: [email protected]; Qi, Fuli/斉 福利 <[email protected]>
Cc: Williams, Dan J <[email protected]>; Tokunaga, Keiichirou/徳永 圭一郎 <[email protected]>
Subject: Re: [ndctl PATCH v13 0/5] ndctl, monitor: add ndctl monitor daemon

Quoted 8 lines · QI Fuli

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.

Hi Qi,

This looks great, thank you for all the updates!

I have applied the series to my local tree, and expect to push it out to the pending branch soon. I will also add reviewed-by tags for Dan (with his permission) since he has been integral to the review of this series.

Quoted 6 lines

I'm also separately sending out the bash completion updates for the monitor command.

Thank you,

-Vishal

Hi Vishal,

Thank you very much for all comments and advices.
I would appreciate your continued support.

Qi
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm