RE: [RFC patch 0/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-09-06 Thread Qi, Fuli
To: Song Liu <songliubrav...@fb.com> Cc: Qi, Fuli/斉 福利 <qi.f...@jp.fujitsu.com>; linux-nvdimm@lists.01.org Subject: Re: [RFC patch 0/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event On Tue, Sep 5, 2017 at 5:02 PM, Song Liu <songliubrav...@fb.com<mailto:son

[RFC patch 2/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-08-31 Thread Qi, Fuli
Nvdimmd.c is the body file of nvdimm daemon. Currently, it writes a log which includes notified dimm's name and spare percentage. Sign-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- nvdimmd/Makefile | 10 +- nvdimmd/nvdimmd.c | 97 +++

[RFC patch 3/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-08-31 Thread Qi, Fuli
Nvdimmd.service is the unit file of systemd for nvdimmd service. Sign-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- nvdimmd/Makefile| 4 nvdimmd/nvdimmd.service | 7 +++ 2 files changed, 11 insertions(+) diff --git a/nvdimmd/Makefile b/nvdimmd/Makefile index 3908e5d..df7eb46

[RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-08-31 Thread Qi, Fuli
-by: QI Fuli <qi.f...@jp.fujitsu.com> --- nvdimmd/Makefile | 7 +++ nvdimmd/getenv.h | 1 + nvdimmd/libnvdimmd.c | 141 +++ nvdimmd/libnvdimmd.h | 31 +++ 4 files changed, 180 insertions(+) diff --git a/nvdimmd/Makefile b/n

[RFC patch 0/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-08-31 Thread Qi, Fuli
to automake if necessary. - Add more information of dimm into the notification. - Add a config file to configure the parameters and initial settings for nvdimmd. - Implement a feature(framework) so that nvdimmd can call external applications. [1] https://lkml.org/lkml/2017/7/26/245 -- QI Fuli

[RFC patch 4/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-08-31 Thread Qi, Fuli
Notify.c is used to call the emulation of event of over threshold. You can test nvdimm daemon with the following command. notify [nmemX] [all] Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- nvdimmd/Makefile | 6 ++- nvdimmd/notify.c

Re: [RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-10-12 Thread Qi, Fuli
} else printf(); If you agree with this idea, I will implement it asap. Or if I had any misunderstanding, please kindly let me know. QI Fuli ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [RFC patch 1/4]ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-10-18 Thread Qi, Fuli
On 2017/10/18 16:22, Dan Williams wrote: On Thu, Oct 12, 2017 at 7:23 PM, Qi, Fuli <qi.f...@jp.fujitsu.com> wrote: Let's use the same logging scheme as libndctl where we have 'struct log_ctx' and the the log function can be set to a custom routine. That way we can redirect log me

[RFC patch v2 0/7] ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-11-13 Thread Qi, Fuli
Hi, here is my second version of nvdimm daemon, It would be appreciated if you could check it. 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()

[RFC PATCH v2 4/7] ndctl: nvdimmd: add body file of nvdimm daemon

2017-11-13 Thread QI Fuli
This patch adds the body file of nvdimm daemon and compiles nvdimmd with automake. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- Makefile.am | 2 +- configure.ac| 1 + nvdimmd/Makefile.am | 19 + nvdimmd/nvdimmd.c

[RFC PATCH v2 7/7] ndctl: nvdimmd: add a temporary test for nvdimm daemon

2017-11-13 Thread QI Fuli
This patch is used to test nvdimmd service temporarily. I will make it an ndctl command or an option of ndctl inject-error in next step. Currently, You can test nvdimm daemon with the following command. nvdimmd_test [nmemX] [all] Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- n

[RFC PATCH v2 0/7] ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-11-13 Thread QI Fuli
"shutdown_state":"clean" } } - text format: 2017/11/10 16:21:53 [12479] log_notify: nvdimm dimm over threshold notify dev: nmem1 health_state: non-critical spares_percentage: 75 TODO list: - The dimms to monitor should be filtered by namespace and region - Add more information into the

[RFC PATCH v2 1/7] ndctl: nvdimmd: add LOG_NOTICE level into log_priority

2017-11-13 Thread QI Fuli
This patch adds LOG_NOTICE level into log_priority for the notifications. Because the LOG_INFO level is too low for the notifications of nvdimm dimm over threshold event, and the event notifications are not up to LOG_ERROR level. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- util/log

[RFC PATCH v2 3/7] ndctl: nvdimmd: add nvdimmd necessary functions

2017-11-13 Thread QI Fuli
Libnvdimmd is used to provide nvdimmd necessary functions. The get_nvdimmd_conf() will read the nvdimmd.conf and set the parameters' value as global variables when nvdimmd service starts. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- nvdimmd/libnvdimmd.c

[RFC PATCH v2 2/7] ndctl: nvdimmd: add nvdimmd necessary util functions

2017-11-13 Thread QI Fuli
This patch is used to provide helper functions needed for nvdimm daemon. These util functions can be used by other features as well in the future. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- nvdimmd/util.c | 80 ++ nvdimmd/

[RFC PATCH v2 5/7] ndctl: nvdimmd: add nvdimmd config file

2017-11-13 Thread QI Fuli
ters in nvdimmd.conf. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- nvdimmd/Makefile.am | 9 + nvdimmd/nvdimmd.conf | 25 + 2 files changed, 34 insertions(+) create mode 100644 nvdimmd/nvdimmd.conf diff --git a/nvdimmd/Makefile.am b/nvdimmd/Makefile

[RFC PATCH v2 6/7] ndctl: nvdimmd: add the unit file of systemd for nvdimmd service

2017-11-13 Thread QI Fuli
This patch adds and autotools to install the unit file of systemd for nvdimmd service. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- nvdimmd/Makefile.am | 7 +++ nvdimmd/nvdimmd.service | 7 +++ 2 files changed, 14 insertions(+) create mode 100644 nvdimmd/nvdimmd.service

Re: [RFC patch v2 0/7] ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-11-13 Thread Qi, Fuli
I am sorry that Imadea mistake encoding this mail. I havesent a new one. Please ignore this mail. ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm

Re: [RFC PATCH v2 0/7] ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-11-20 Thread Qi, Fuli
On 2017/11/21 1:13, Dan Williams wrote: On Mon, Nov 20, 2017 at 2:07 AM, Yasunori Goto <y-g...@jp.fujitsu.com> wrote: On Mon, Nov 13, 2017 at 11:46 PM, QI Fuli <qi.f...@jp.fujitsu.com> wrote: Hi, here is my second version of nvdimm daemon, It would be appreciated if you

Re: [RFC PATCH v2 0/7] ndctl: nvdimmd: notify/monitor the feathers of over threshold event

2017-12-07 Thread Qi, Fuli
On 2017/11/21 10:59, Qi, Fuli wrote: On 2017/11/21 1:13, Dan Williams wrote: On Mon, Nov 20, 2017 at 2:07 AM, Yasunori Goto <y-g...@jp.fujitsu.com> wrote: On Mon, Nov 13, 2017 at 11:46 PM, QI Fuli <qi.f...@jp.fujitsu.com> wrote: Hi, here is my second version of nvdimm daem

Re: [RFC PATCH v2 2/7] ndctl: nvdimmd: add nvdimmd necessary util functions

2017-12-07 Thread Qi, Fuli
+ rename(file, buf); +} Why does the monitor need to rotate logs? This should be the responsibility of whatever is consuming the nvdimmd events. When I wrote it, I thought that users can rotate nvdimmd logs without using other tools. If you think it is not necessary, I will remove it

Re: [RFC PATCH v2 2/7] ndctl: nvdimmd: add nvdimmd necessary util functions

2017-12-05 Thread Qi, Fuli
On 2017/11/21 6:19, Dan Williams wrote: On Mon, Nov 13, 2017 at 11:46 PM, QI Fuli <qi.f...@jp.fujitsu.com> wrote: This patch is used to provide helper functions needed for nvdimm daemon. These util functions can be used by other features as well in the future. Signed-off-by: QI Fuli

[PATCH v6 2/4] ndctl, monitor: add ndctl monitor daemon

2018-05-06 Thread QI Fuli
This patch adds the body file of ndctl monitor daemon. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- builtin.h | 1 + ndctl/Makefile.am | 3 +- ndctl/monitor.c | 460 ++ ndctl/ndctl.c | 1 + 4 files changed, 464 inse

[PATCH v6 3/4] ndctl, monitor: add default configuration file

2018-05-06 Thread QI Fuli
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 <qi.f...@jp.fujitsu.

[PATCH v6 4/4] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-05-06 Thread 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]". Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- autogen.sh | 3 +

RE: [PATCH v2] ndctl, filter: fix "keyword 'all' is ignored" in util__filter()

2018-05-06 Thread Qi, Fuli
> -Original Message- > From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] > Sent: Thursday, May 3, 2018 6:38 AM > To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利 <qi.f...@jp.fujitsu.com> > Subject: Re: [PATCH v2] ndctl, filter: fix "keyword 'all' is

[PATCH v6 0/4] ndctl, monitor: add ndctl monitor daemon

2018-05-06 Thread QI Fuli
n file /etc/ndctl/monitor.conf. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- 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 config

[PATCH v6 1/4] ndctl, util: add OPTION_FILENAME to parse_opt_type

2018-05-06 Thread QI Fuli
This patch borrows the OPTION_FILENAME from git to ndctl to make sure filename is correct. Some related refactoring is also included: - adds parse_options_prefix() interface - moves is_absolute from util/help.c to util/util.c - adds a new file util/abspath.c Signed-off-by: QI Fuli <q

RE: [PATCH v5 1/4] ndctl, util: add OPTION_FILENAME to parse_opt_type

2018-05-06 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Friday, May 4, 2018 12:26 PM > To: Qi, Fuli/斉 福利 <qi.f...@jp.fujitsu.com> > Cc: linux-nvdimm <linux-nvdimm@lists.01.org> > Subject: Re: [PATCH v5 1/4] ndctl, util: add OPT

[PATCH v5 0/4] ndctl, monitor: add ndctl monitor daemon

2018-04-26 Thread QI Fuli
n file /etc/ndctl/monitor.conf. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> Change log since v4: - Adding OPTION_FILENAME to make sure filename is correct - Adding configuration file - Adding [--config-file] option to override the default cofiguration file - Making some options supp

[PATCH v5 3/4] ndctl, monitor: add default configuration file

2018-04-26 Thread QI Fuli
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 <q

[PATCH v5 2/4] ndctl, monitor: add ndctl monitor daemon

2018-04-26 Thread QI Fuli
This patch adds the body file of ndctl monitor daemon. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- builtin.h | 1 + ndctl/Makefile.am | 3 +- ndctl/monitor.c | 460 ++ ndctl/ndctl.c | 1 + 4 files changed, 464 inse

[PATCH v5 4/4] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-04-26 Thread 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]". Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- autogen.sh | 3 +

RE: [PATCH v6 2/4] ndctl, monitor: add ndctl monitor daemon

2018-05-25 Thread Qi, Fuli
> As mentioned above this function seems to assume that the only DIMM events to > send are DIMM health events. It's ok to save other object monitoring to a > later patch, > but let's at least support DIMM health > events: > > dimm-spares-remaining > dimm-media-temperature >

RE: [PATCH v6 2/4] ndctl, monitor: add ndctl monitor daemon

2018-05-15 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Saturday, May 12, 2018 3:45 AM > To: Qi, Fuli/斉 福利 <qi.f...@jp.fujitsu.com> > Cc: linux-nvdimm <linux-nvdimm@lists.01.org> > Subject: Re: [PATCH v6 2/4] ndctl, monitor: add nd

RE: [PATCH v6 2/4] ndctl, monitor: add ndctl monitor daemon

2018-05-15 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Wednesday, May 16, 2018 2:07 AM > To: Qi, Fuli/斉 福利 <qi.f...@jp.fujitsu.com> > Cc: linux-nvdimm <linux-nvdimm@lists.01.org> > Subject: Re: [PATCH v6 2/4] ndctl, monitor: add nd

RE: [ndctl PATCH] ndctl, list: Add controller temperature

2018-06-14 Thread Qi, Fuli
> -Original Message- > From: Linux-nvdimm [mailto:linux-nvdimm-boun...@lists.01.org] On Behalf Of Dan > Williams > Sent: Thursday, June 14, 2018 8:11 AM > To: linux-nvdimm@lists.01.org > Subject: [ndctl PATCH] ndctl, list: Add controller temperature > > Emit the controller temperature if

Question about how to emulate the dimm-controller-temperature event

2018-06-14 Thread QI Fuli
I want to make an emulation of dimm-controller-temperature event to test if ndctl monitor could catch this dimm event. I tried to use ndctl inject-smart command, but I found the controller temperature smart attribute of dimm cannot be injected by command like # ndctl inject-smart nmem2

RE: [PATCH v6 1/4] ndctl, util: add OPTION_FILENAME to parse_opt_type

2018-06-12 Thread Qi, Fuli
> -Original Message- > From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] > Sent: Wednesday, June 13, 2018 7:45 AM > To: Williams, Dan J ; Qi, Fuli/斉 福利 > > Cc: linux-nvdimm@lists.01.org > Subject: Re: [PATCH v6 1/4] ndctl, util: add OPTION_FILENAME to > pa

[PATCH v7 2/3] ndctl, monitor: add main ndctl monitor configuration file

2018-06-18 Thread QI Fuli
will work after resetart ndctl monitor service. Signed-off-by: QI Fuli --- ndctl/Makefile.am | 5 ++ ndctl/monitor.c| 115 + ndctl/monitor.conf | 42 + 3 files changed, 162 insertions(+) create mode 100644 ndctl/monitor.conf

[PATCH v7 1/3] ndctl, monitor: add ndctl monitor

2018-06-18 Thread QI Fuli
[--daemon] option, like: # ndctl monitor --daemon --logfile /var/log/ndctl/monitor.log Signed-off-by: QI Fuli --- builtin.h | 1 + ndctl/Makefile.am | 3 +- ndctl/monitor.c | 532 ++ ndctl/ndctl.c | 1 + 4 files changed, 536 insertions

[PATCH v7 0/3] ndctl, monitor: add ndctl monitor daemon

2018-06-18 Thread QI Fuli
notification to logfile, therefore users can replace NVDIMM before it is completely broken. Signed-off-by: QI Fuli --- 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

[PATCH v7 3/3] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-06-18 Thread 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 Signed-off-b

RE: Question about ndctl unit tests

2018-07-02 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Sunday, July 1, 2018 3:12 AM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm@lists.01.org; Verma, Vishal L ; > Mizuma, > Masayoshi/水間 理仁 ; Gotou, Yasunori/五島 康文 > > Subject: Re: Ques

RE: [PATCH v7 2/3] ndctl, monitor: add main ndctl monitor configuration file

2018-06-26 Thread Qi, Fuli
Hi Dan, Thanks for your comments. > -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Tuesday, June 26, 2018 1:43 PM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [PATCH v7 2/3] ndctl, monitor: add main ndctl monitor >

RE: [PATCH] ndctl, list: add controller temperature threshold

2018-06-25 Thread Qi, Fuli
> -Original Message- > From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] > Sent: Tuesday, June 26, 2018 5:09 AM > To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利 > Subject: Re: [PATCH] ndctl, list: add controller temperature threshold > > On Mon, 2018-06-25 at

[PATCH v2] ndctl, list: add controller temperature threshold

2018-06-25 Thread QI Fuli
This patch is used for adding controller_temperature_threshold and alarm_controller_temperature to list. When a dimm-controller-temperature event fires, users need to know the current controller temperature threshold value. Signed-off-by: QI Fuli --- ndctl/util/json-smart.c | 17

[PATCH] ndctl, list: add controller temperature threshold

2018-06-25 Thread QI Fuli
This patch adds controller temperature threshold to list. When the dimm-controller-temperature event fires, users need to know the current controller temperature threshold value. Signed-off-by: QI Fuli --- ndctl/util/json-smart.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH v8 2/3] ndctl, monitor: add main ndctl monitor configuration file

2018-06-26 Thread QI Fuli
will work after restart ndctl monitor service. Signed-off-by: QI Fuli --- ndctl/Makefile.am | 5 ++ ndctl/monitor.c| 115 + ndctl/monitor.conf | 41 3 files changed, 161 insertions(+) create mode 100644 ndctl/monitor.conf diff

[PATCH v8 1/3] ndctl, monitor: add ndctl monitor

2018-06-26 Thread QI Fuli
as a daemon by using [--daemon] option, such as: # ndctl monitor --daemon --logfile /var/log/ndctl/monitor.log Signed-off-by: QI Fuli --- builtin.h | 1 + ndctl/Makefile.am | 3 +- ndctl/monitor.c | 508 ++ ndctl/ndctl.c | 1 + 4 files

[PATCH v8 3/3] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-06-26 Thread 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 Signed-off-b

[PATCH v8 0/3] ndctl, monitor: add ndctl monitor daemon

2018-06-26 Thread QI Fuli
notification to logfile, therefore users can replace NVDIMM before it is completely broken. Signed-off-by: QI Fuli --- 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

Question about ndctl unit tests

2018-06-30 Thread Qi, Fuli
Hi, When I ran the unit tests, I found "libndctl" and "dsm-fail" cannot pass the test. Here is the test log. # less test/libndctl.log libkmod: kmod_module_remove_module: could not remove 'nfit_test': No such file or directory check_set_config_data: dimm: 0 read2 data miscompare: 0

RE: [PATCH] ndctl, util: add OPTION_FILENAME to parse_opt_type

2018-04-26 Thread Qi, Fuli
Please ignore this patch. I will send the v5 patch set of ndctl monitor which includes this one. > -Original Message- > From: QI Fuli [mailto:qi.f...@jp.fujitsu.com] > Sent: Friday, April 20, 2018 4:28 PM > To: linux-nvdimm@lists.01.org > Cc: Qi, Fuli/斉 福利 <qi.f

[RFC PATCH v3 2/5] ndctl: monitor: add ndctl create-monitor command

2018-02-09 Thread QI Fuli
--output m_nmem.log Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- builtin.h | 1 + configure.ac | 3 + ndctl/Makefile.am | 3 +- ndctl/monitor.c | 342 ++ ndctl/ndctl.c | 1 + 5 files changed, 349 insertions

[RFC PATCH v3 4/5] ndctl: monitor: add ndclt show-monitor command

2018-02-09 Thread QI Fuli
This patch is used to add $ndctl show-monitor command, by which users can check the specific of a monitor. Example: $ndctl show-monitor --monitor m_nmem1 Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- builtin.h | 1 + ndctl/monitor.c | 35 +++

[RfC PATCH v3 5/5] ndctl: monitor: add ndclt destroy-monitor command

2018-02-09 Thread QI Fuli
This patch is used to add $ndctl destroy-monitor command, by which users can destroy a monitor. After the monitor is destroyed, the file with same name under /var/ndctl/monitor will also be deleted. Example: #ndctl destroy-monitor --monitor m_nmem1 Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.

[RFC PATCH v3 3/5] ndctl: monitor: add ndclt list-monitor command

2018-02-09 Thread QI Fuli
This patch adds $ndctl list-monitor command, by which users can list all currently running monitors. Example: $ndctl list-monitor --all Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- builtin.h | 1 + ndctl/monitor.c | 32 ndctl/ndctl.c |

[RFC PATCH v3 1/5] ndctl: nvdimmd: add LOG_NOTICE level to

2018-02-09 Thread QI Fuli
This patch adds LOG_NOTICE level to log_priority for the notifications of nvdimm dimm over threshold event. Currently, the LOG_INFO level is too low, and the notifications are not up to LOG_ERROR level. Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- util/log.c | 2 ++ util/log.h | 3

[RFC PATCH v3 0/5] ndctl: monitor: monitor the smart events of

2018-02-09 Thread QI Fuli
file(nvdimmd/util.c) including helper functions needed for nvdimm daemon - Adding nvdimmd_test program QI Fuli (5): ndctl: monitor: add LOG_NOTICE level to log_priority ndctl: monitor: add ndclt create-monitor command ndctl: monitor: add ndclt list-monitor command ndctl: monitor: add ndclt

Re: [RFC PATCH v3 0/5] ndctl: monitor: monitor the smart events of

2018-02-12 Thread Qi, Fuli
On 2018/02/10 3:06, Verma, Vishal L wrote: On Fri, 2018-02-09 at 17:02 +0900, QI Fuli wrote: This is a patch set of ndctl monitor, a tiny daemon to monitor the smart events of nvdimm dimms. When a smart event fires, monitor will output the notification which including dimm health status

Re: [RFC PATCH v3 0/5] ndctl: monitor: monitor the smart events of

2018-02-12 Thread Qi, Fuli
On 2018/02/10 13:06, Dan Williams wrote: On Fri, Feb 9, 2018 at 12:02 AM, QI Fuli <qi.f...@jp.fujitsu.com> wrote: This is a patch set of ndctl monitor, a tiny daemon to monitor the smart events of nvdimm dimms. When a smart event fires, monitor will output the notification which includin

Re: [RFC PATCH v3 2/5] ndctl: monitor: add ndctl create-monitor command

2018-02-14 Thread Qi, Fuli
Hi Qi, This is getting closer to where I want to see this go, but still some architecture details to incorporate. I mentioned on the cover letter that systemd can handle starting, stopping, and show the status of the monitor. The other detail to incorporate is that monitor events can come

[RFC PATCH] ndctl, list: add ndctl_filter_opts for sharing filter

2018-02-21 Thread QI Fuli
nitor". Signed-off-by: QI Fuli <qi.f...@jp.fujitsu.com> --- ndctl/list.c | 142 +++ ndctl/list.h | 35 +++ 2 files changed, 129 insertions(+), 48 deletions(-) create mode 100644 ndctl/list.h diff --git a/ndctl/l

RE: [ndctl PATCH] ndctl, test/monitor: fix inject-smart field in test_filter_dimmevent

2018-07-30 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vishal.l.ve...@intel.com] > Sent: Tuesday, July 31, 2018 4:35 AM > To: linux-nvdimm@lists.01.org > Cc: Vishal Verma ; Qi, Fuli/斉 福利 > > Subject: [ndctl PATCH] ndctl, test/monitor: fix inject-smart field in &g

RE: [ndctl PATCH] ndctl: deprecate undocumented short-options

2018-07-29 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vishal.l.ve...@intel.com] > Sent: Saturday, July 28, 2018 3:31 AM > To: linux-nvdimm@lists.01.org > Cc: Vishal Verma ; Qi, Fuli/斉 福利 > > Subject: [ndctl PATCH] ndctl: deprecate undocumented short-options > > T

[ndctl PATCH] ndctl, monitor: add [--verbose] option to emit extra debug messages

2018-08-02 Thread QI Fuli
In the ndctl monitor, currently the debug messages cannot be outputted to log. This patch is used for adding [--verbose] option to ndctl monitor to emit debug messages. Also, the log level of some messages are changed by this patch. Cc: Masayoshi Mizuma Signed-off-by: QI Fuli --- Documentation

RE: [ndclt PATCH] ndctl, monitor: Fix duplicate prefix in monitor.log

2018-08-02 Thread Qi, Fuli
> -Original Message- > From: Masayoshi Mizuma [mailto:msys.miz...@gmail.com] > Sent: Thursday, August 2, 2018 3:15 AM > To: Qi, Fuli/斉 福利 ; linux-nvdimm@lists.01.org > Subject: Re: [ndclt PATCH] ndctl, monitor: Fix duplicate prefix in monitor.log > > Hi QI, > >

[ndclt PATCH] ndctl, monitor: Fix duplicate prefix in monitor.log

2018-07-30 Thread QI Fuli
mmand - monitor") Signed-off-by: QI Fuli --- ndctl/monitor.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ndctl/monitor.c b/ndctl/monitor.c index c6419ad..4e5daf5 100644 --- a/ndctl/monitor.c +++ b/ndctl/monitor.c @@ -614,7 +614,8 @@ int cmd_monitor(int argc, const char **

RE: [PATCH] ndctl, monitor: Change the fail log priority to err.

2018-08-02 Thread Qi, Fuli
> -Original Message- > From: Masayoshi Mizuma [mailto:msys.miz...@gmail.com] > Sent: Thursday, August 2, 2018 3:56 AM > To: linux-nvdimm@lists.01.org > Cc: Masayoshi Mizuma ; Qi, Fuli/斉 福利 > ; Mizuma, Masayoshi/水間 理仁 > Subject: [PATCH] ndctl, monitor: Change the fai

RE: [ndctl PATCH 1/4] ndctl, monitor: fix the lack of detection of invalid path of log file

2018-08-07 Thread Qi, Fuli
> -Original Message- > From: Masayoshi Mizuma [mailto:msys.miz...@gmail.com] > Sent: Wednesday, August 8, 2018 4:06 AM > To: Qi, Fuli/斉 福利 ; linux-nvdimm@lists.01.org > Subject: Re: [ndctl PATCH 1/4] ndctl, monitor: fix the lack of detection of > invalid > path o

RE: [ndctl PATCH 2/4] ndctl, monitor: set default log destination to syslog if "--daemon" is specified

2018-08-07 Thread Qi, Fuli
> -Original Message- > From: Masayoshi Mizuma [mailto:msys.miz...@gmail.com] > Sent: Wednesday, August 8, 2018 4:30 AM > To: Qi, Fuli/斉 福利 ; linux-nvdimm@lists.01.org > Subject: Re: [ndctl PATCH 2/4] ndctl, monitor: set default log destination to > syslog > if &q

RE: [ndctl PATCH] ndctl, list: emit alarm_enable_ and clarify misc list items

2018-08-07 Thread Qi, Fuli
Hi Vishal, Thanks for your comments. > -Original Message- > From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] > Sent: Wednesday, August 8, 2018 5:15 AM > To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利 > Subject: Re: [ndctl PATCH] ndctl, list: emit alarm_enable_ and

RE: [ndctl PATCH 3/4] ndctl, monitor: add timestamp and pid to log messages in log_file()

2018-08-07 Thread Qi, Fuli
> -Original Message- > From: Masayoshi Mizuma [mailto:msys.miz...@gmail.com] > Sent: Wednesday, August 8, 2018 3:40 AM > To: Qi, Fuli/斉 福利 ; linux-nvdimm@lists.01.org > Subject: Re: [ndctl PATCH 3/4] ndctl, monitor: add timestamp and pid to log > messages > in

[ndctl PATCH v2] ndctl, list: add alarm_enable_ to list

2018-08-07 Thread QI Fuli
This patch adds alarm_enable_ to list, so that users could check if the "ndctl inject-smart ---alarm=on/off" works well or not. Signed-off-by: QI Fuli --- v1 -> v2: remove the renaming for list items. ndctl/util/json-smart.c | 27 +++ 1 file changed,

RE: [ndctl PATCH 2/4] ndctl, monitor: set default log destination to syslog if "--daemon" is specified

2018-08-08 Thread Qi, Fuli
> -Original Message- > From: Masayoshi Mizuma [mailto:msys.miz...@gmail.com] > Sent: Wednesday, August 8, 2018 10:35 PM > To: Qi, Fuli/斉 福利 ; linux-nvdimm@lists.01.org > Subject: Re: [ndctl PATCH 2/4] ndctl, monitor: set default log destination to > syslog if > &q

RE: [ndctl PATCH 1/3] ndctl, monitor: Fix formatting for --log in the man page

2018-08-14 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vishal.l.ve...@intel.com] > Sent: Wednesday, August 15, 2018 8:06 AM > To: linux-nvdimm@lists.01.org > Cc: Vishal Verma ; Qi, Fuli/斉 福利 > > Subject: [ndctl PATCH 1/3] ndctl, monitor: Fix formatting for --log in the &

[ndctl PATCH] ndctl, list: emit alarm_enable_ and clarify misc list items

2018-08-07 Thread QI Fuli
This patch adds alarm_enable_ to list. Therefore, users can know if the "ndclt inject-smart ---alarm=on/off" works or not. Users may confuse "alarm_enable" with "alarm_flag" and "media_temperature" with "ctrl_temperature", this patch also us

[ndctl PATCH 0/4] Some fixups and improvements ndctl monitor

2018-08-07 Thread QI Fuli
Fix a couple of issues about log collection, and add [Install] section to systemd unit file of ndclt-monitor. Signed-off-by: QI Fuli --- QI Fuli (4): ndctl, monitor: fix the lack of detection of invalid path of log file ndctl, monitor: set default log destination to syslog if "--d

[ndctl PATCH 2/4] ndctl, monitor: set default log destination to syslog if "--daemon" is specified

2018-08-07 Thread QI Fuli
y will lose messages. This patch is used to fix the unfriendly interface. When running monitor as a daemon, the default log destination will be changed to syslog. Also, the messages will be forwarded to syslog if the log destination is a relative path for log file. Signed-off-by: QI Fuli ---

[ndctl PATCH 3/4] ndctl, monitor: add timestamp and pid to log messages in log_file()

2018-08-07 Thread QI Fuli
This patch is used to add timestamp and process id to log messages when logging messages to a file. Signed-off-by: QI Fuli --- ndctl/monitor.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ndctl/monitor.c b/ndctl/monitor.c index 2f3d751..d29e378 100644

[ndctl PATCH 4/4] ndctl, monitor: add [Install] Section to systemd unit file of ndctl-monitor

2018-08-07 Thread QI Fuli
This patch is used to add "[Install]" section to systemd unit file of ndctl-monitor. Therefore, users can set ndctl-monitor unit enable. Signed-off-by: QI Fuli --- ndctl/ndctl-monitor.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ndctl/ndctl-monitor.service b/n

[ndctl PATCH 1/4] ndctl, monitor: fix the lack of detection of invalid path of log file

2018-08-07 Thread QI Fuli
Currently the monitor can be started even with an invalid path of log file. This patch adds a detection of invalid path of log file when starting monitor. If the path of log file is invalid, the monitor will refuse to be started. Signed-off-by: QI Fuli --- ndctl/monitor.c | 11 ++- 1

RE: [ndctl PATCH] ndctl, test: add UUID_LIBS for list_smart_dimm

2018-08-20 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vishal.l.ve...@intel.com] > Sent: Tuesday, August 21, 2018 5:21 AM > To: linux-nvdimm@lists.01.org > Cc: Vishal Verma ; Qi, Fuli/斉 福利 > > Subject: [ndctl PATCH] ndctl, test: add UUID_LIBS for list_smart_dimm &

RE: [ndctl PATCH v13 0/5] ndctl, monitor: add ndctl monitor daemon

2018-07-18 Thread Qi, Fuli
> -Original Message- > From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] > Sent: Thursday, July 19, 2018 9:43 AM > To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利 > Cc: Williams, Dan J ; Tokunaga, Keiichirou/徳永 圭一郎 > > Subject: Re: [ndctl PATCH v13 0/5] ndct

RE: [ndctl PATCH 0/4] misc fixups for ndctl-monitor

2018-07-19 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vishal.l.ve...@intel.com] > Sent: Friday, July 20, 2018 8:00 AM > To: linux-nvdimm@lists.01.org > Cc: Qi, Fuli/斉 福利 ; Vishal Verma > > Subject: [ndctl PATCH 0/4] misc fixups for ndctl-monitor > > Fix a couple o

RE: [ndctl PATCH 0/4] misc fixups for ndctl-monitor

2018-07-19 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vis...@kernel.org] > Sent: Friday, July 20, 2018 12:26 PM > To: Qi, Fuli/斉 福利 ; 'Vishal Verma' > ; linux-nvdimm@lists.01.org > Subject: Re: [ndctl PATCH 0/4] misc fixups for ndctl-monitor > > On Thu, 2018-07-19

RE: [ndctl PATCH] ndctl, monitor: fix a resource leak in parse_monitor_event

2018-07-24 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vishal.l.ve...@intel.com] > Sent: Wednesday, July 25, 2018 9:09 AM > To: linux-nvdimm@lists.01.org > Cc: Qi, Fuli/斉 福利 ; Vishal Verma > > Subject: [ndctl PATCH] ndctl, monitor: fix a resource leak in > parse_m

[PATCH] ndctl, monitor: fix monitor can be started though no dimm event to monitor

2018-07-19 Thread QI Fuli
, the monitor will stop and output error message. Signed-off-by: QI Fuli --- ndctl/monitor.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/ndctl/monitor.c b/ndctl/monitor.c index 8300250..abab45f 100644 --- a/ndctl/monitor.c +++ b/ndctl/monitor.c @@ -413,7

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

2018-07-13 Thread QI Fuli
will work after restart ndctl monitor service. Signed-off-by: QI Fuli --- configure.ac | 1 + ndctl.spec.in | 1 + ndctl/Makefile.am | 5 +++ ndctl/monitor.c| 110 - ndctl/monitor.conf | 41 + 5 files changed, 157

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

2018-07-13 Thread QI Fuli
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 | 108 ++ 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 Documentation

[ndctl PATCH v13 0/5] ndctl, monitor: add ndctl monitor daemon

2018-07-13 Thread QI Fuli
notification to logfile, therefore users can replace NVDIMM before it is completely broken. Signed-off-by: QI Fuli --- 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

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

2018-07-13 Thread QI Fuli
as a daemon by using [--daemon] option, such as: # ndctl monitor --daemon --log /var/log/ndctl/monitor.log Signed-off-by: QI Fuli --- builtin.h | 1 + ndctl/Makefile.am | 3 +- ndctl/lib/libndctl.c | 82 +++ ndctl/lib/libndctl.sym | 4 + ndctl/libndctl.h | 10

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

2018-07-13 Thread QI Fuli
Add a new unit test to test all options of the monitor command. Based-on-patch-by: Yasunori Goto Acked-by: Masayoshi Mizuma Signed-off-by: QI Fuli --- .gitignore | 1 + test/Makefile.am | 14 +++- test/list-smart-dimm.c | 117 +++ test/monitor.sh

[ndctl PATCH] ndctl, test: add a new unit test for monitor

2018-07-05 Thread QI Fuli
Add a new unit test to test the follow options of the monitor command. --dimm --bus --region --namespace --logfile --config-file Based-on-patch-by: Yasunori Goto Signed-off-by: QI Fuli --- test/Makefile.am | 3 +- test/monitor.sh | 115

[ndctl PATCH v2] ndctl, test: add a new unit test for monitor

2018-07-05 Thread QI Fuli
Add a new unit test to test the following options of the monitor command. --dimm --bus --region --namespace --logfile --config-file Based-on-patch-by: Yasunori Goto Acked-by: Masayoshi Mizuma Signed-off-by: QI Fuli --- v1 -> v2: - Add init() - Add get_filter_dimm() to

RE: [ndctl PATCH] ndctl, test: add a new unit test for monitor

2018-07-05 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Friday, July 6, 2018 6:26 AM > To: Masayoshi Mizuma > Cc: Qi, Fuli/斉 福利 ; linux-nvdimm > > Subject: Re: [ndctl PATCH] ndctl, test: add a new unit test for monitor > > On

RE: [ndctl PATCH v3] ndctl, test: add a new unit test for monitor

2018-07-10 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Tuesday, July 10, 2018 12:46 AM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [ndctl PATCH v3] ndctl, test: add a new unit test for monitor > > On Mon, Jul 9, 2018 at

RE: [ndctl PATCH v4] ndctl, test: add a new unit test for monitor

2018-07-10 Thread Qi, Fuli
> -Original Message- > From: Masayoshi Mizuma [mailto:msys.miz...@gmail.com] > Sent: Wednesday, July 11, 2018 12:11 AM > To: Qi, Fuli/斉 福利 ; linux-nvdimm@lists.01.org > Subject: Re: [ndctl PATCH v4] ndctl, test: add a new unit test for monitor > > Hi Qi > > Th

[ndctl PATCH v11 5/5] ndctl, test: add a new unit test for monitor

2018-07-10 Thread QI Fuli
Add a new unit test to test all options of the monitor command. Based-on-patch-by: Yasunori Goto Signed-off-by: QI Fuli --- .gitignore | 1 + test/Makefile.am | 14 +++- test/list-smart-dimm.c | 117 +++ test/monitor.sh| 177

  1   2   >