[RFC ndctl PATCH 1/3] ndctl, ccan: import ciniparser

2021-05-16 Thread QI Fuli
From: QI Fuli Import ciniparser from ccan[1]. [1] https://ccodearchive.net/info/ciniparser.html Signed-off-by: QI Fuli --- Makefile.am | 6 +- ccan/ciniparser/ciniparser.c | 480 +++ ccan/ciniparser/ciniparser.h | 262

[RFC ndctl PATCH 3/3] ndctl, rename monitor.conf to ndctl.conf

2021-05-16 Thread QI Fuli
From: QI Fuli Rename monitor.conf to ndctl.conf, and make it a ndclt global configuration file that all commands can refer to. Refactor monitor to make it work with ndctl.conf. Signed-off-by: QI Fuli --- configure.ac | 8 +- ndctl/Makefile.am | 9

[RFC ndctl PATCH 2/3] ndctl, util: add parse-configs helper

2021-05-16 Thread QI Fuli
From: QI Fuli Add parse-config helper to help ndctl commands read the ndctl global configuration file. Signed-off-by: QI Fuli --- Makefile.am | 2 ++ util/parse-configs.c | 47 util/parse-configs.h | 26 3 files

[RFC ndctl PATCH 0/3] Rename monitor.conf to ndctl.conf as a ndctl global config file

2021-05-16 Thread QI Fuli
From: QI Fuli This patch set is to rename monitor.conf to ndctl.conf, and make it a global ndctl configuration file that all ndctl commands can refer to. As this patch set has been pending until now, I would like to know if current idea works or not. If yes, I will finish the documents and test

[ndctl PATCH 2/2] ndctl/test: add checking the presence of jq command ahead

2021-03-01 Thread QI Fuli
Due to the lack of jq command, the result of the test will be 'fail'. This patch adds checking the presence of jq commmand ahead. If there is no jq command in the system, the test will be marked as 'skip'. Signed-off-by: QI Fuli Link: https://github.com/pmem/ndctl/issues/141 --- test/daxdev

[ndctl PATCH 1/2] configure: add checking jq command

2021-03-01 Thread QI Fuli
Add checking jq command since it is needed to validate tests Cc: Santosh Sivaraj Signed-off-by: QI Fuli Link: https://github.com/pmem/ndctl/issues/141 --- configure.ac | 6 ++ 1 file changed, 6 insertions(+) diff --git a/configure.ac b/configure.ac index 5ec8d2f..839836b 100644

[ndctl PATCH] ndctl/test: add checking the presence of jq command ahead

2021-02-03 Thread QI Fuli
Due to the lack of jq command, the result of the test will be 'fail'. This patch adds checking the presence of jq commmand ahead. If there is no jq command in the system, the test will be marked as 'skip'. Signed-off-by: QI Fuli Link: https://github.com/pmem/ndctl/issues/141 --- test/daxdev

[ndctl PATCH] ndctl: update .gitignore

2021-02-02 Thread QI Fuli
Add Documentation/ndctl/attrs.adoc and *.lo to .gitignore. Signed-off-by: QI Fuli --- .gitignore | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 3ef9ff7..53512b2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.o +*.lo *.xml

[ndctl PATCH] monitor: removing the requirement of default config

2019-03-29 Thread QI Fuli
Removing the requirement of default configuration file. If "-c, --config-file" option is not specified, default configuration file should be dispensable. Link: https://github.com/pmem/ndctl/issues/83 Signed-off-by: QI Fuli --- ndctl/monitor.c | 7 +-- 1 file changed, 5 insert

[ndctl PATCH v2 0/2] ndctl, monitor: refactor read_config_file

2019-01-07 Thread QI Fuli
This patch set is used for refactoring read_config_file by using ccan/ciniparser library. Signed-off-by: QI Fuli -- Change log since v1: - Fix the conflicts with the lastest cleanup patch of monitor QI Fuli (2): ndctl: add the ciniparser tool from ccan ndctl, monitor: refactor

[ndctl PATCH v2 1/2] ndctl: add the ciniparser tool from ccan

2019-01-07 Thread QI Fuli
Import ciniparser tool from ccan [1], therefore, the ndctl monitor can read the configuration file by using this library. [1]: https://ccodearchive.net/info/ciniparser.html Signed-off-by: QI Fuli --- Makefile.am | 6 +- ccan/ciniparser/LICENSE | 1 + ccan/ciniparser

[PATCH 2/2] ndctl, monitor: refactor parse_config_file

2018-12-19 Thread QI Fuli
This patch is used for refactoring parse_config_file by replacing the open coded implementation with ccan/ciniparser library. Signed-off-by: QI Fuli --- ndctl/Makefile.am | 1 + ndctl/monitor.c| 114 - ndctl/monitor.conf | 2 + 3 files

[PATCH 1/2] ndctl: add the ciniparser tool from ccan

2018-12-19 Thread QI Fuli
Import ciniparser tool from ccan [1], therefore, the ndctl monitor can read the configuration file by using this library. [1]: https://ccodearchive.net/info/ciniparser.html Signed-off-by: QI Fuli --- Makefile.am | 6 +- ccan/ciniparser/LICENSE | 1 + ccan/ciniparser

[PATCH] ndctl, monitor: fix the sevrity of "daemon started" message

2018-10-05 Thread QI Fuli
The "daemon started" message was printed as an error and this is improper. This patch is used to chang it to info() meanwhile to chang the default log level of monitor to "LOG_INFO". Signed-off-by: QI Fuli --- ndctl/monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 dele

RE: [ndctl PATCH 1/2] ndctl, monitor: fix the severity of the "daemon started" message

2018-10-05 Thread Qi, Fuli
goto out; > > } > > err((struct ndctl_ctx *)ctx, "ndctl monitor daemon > > started\n"); > > Yes, this looks good to me. Will you send a proper patch for this, and I > can replace my patch with yours. > > Th

RE: [ndctl PATCH 2/2] ndctl, monitor: in daemon mode, exit successfully if no DIMMs are found

2018-10-04 Thread Qi, Fuli
> -Original Message- > From: Vishal Verma [mailto:vishal.l.ve...@intel.com] > Sent: Friday, October 5, 2018 9:01 AM > To: linux-nvdimm@lists.01.org > Cc: Qi, Fuli/斉 福利 ; Andreas Hasenack > ; Vishal Verma ; Dan > Williams > Subject: [ndctl PATCH 2/2] ndctl, monit

RE: [ndctl PATCH 1/2] ndctl, monitor: fix the severity of the "daemon started" message

2018-10-04 Thread Qi, Fuli
ly for developer, but also it is essential for > > trouble-shooter for custmer support. > > (It may be also same with system operator) > > > > > > > > > > Cc: QI Fuli > > > Cc: Dan Williams > > > Signed-off-by: Vishal Verma >

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 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 &

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

[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-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 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] 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] 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 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 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 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

[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] 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: [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: [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: [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

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

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 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

[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

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

[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 v13 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-13 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

[ndctl PATCH v12 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 v11: - Adding log_standard() - Adding [-u | --human] option - Fixing man page - Refactoring unit test - Updating configuration file and systemd unit file to RPM

[ndctl PATCH v12 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 v12 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 | 104 ++ 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 Documentation

[ndctl PATCH v12 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 --- ndctl.spec.in | 1 + ndctl/Makefile.am | 5 +++ ndctl/monitor.c| 110 + ndctl/monitor.conf | 41 + 4 files changed, 157 insertions(+) create mode

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

2018-07-13 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

[ndctl PATCH v12 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

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

2018-07-13 Thread Qi, Fuli
> -Original Message- > From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] > Sent: Friday, July 13, 2018 11:47 AM > To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利 > Subject: Re: [ndctl PATCH v11 3/5] ndctl, monitor: add the unit file of > systemd for >

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

2018-07-12 Thread Qi, Fuli
> On Thu, 2018-07-12 at 15:51 -0400, Masayoshi Mizuma wrote: > > Hi Qi, > > > > Nice work! Let me ask some comments. > > > > On 07/10/2018 11:00 PM, QI Fuli wrote: > > [...] > > > diff --git a/test/monitor.sh b/test/monitor.sh new file mode 100755

[ndctl PATCH] ndctl, documentation: fix the manpage of inject-smart

2018-07-11 Thread QI Fuli
The ndctl inject-smart doesn't have a [-H | --health] option. This patch replaces [-H | --health] in the manpage of inject-smart with [-f | --fatal]. Signed-off-by: QI Fuli --- Documentation/ndctl/ndctl-inject-smart.txt | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff

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

2018-07-10 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

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

2018-07-10 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

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

2018-07-10 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/lib/libndctl.c | 82 +++ ndctl/lib/libndctl.sym | 4 + ndctl/libndctl.h | 10

[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

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

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

[ndctl PATCH v11 4/5] ndctl, documentation: add manpage for monitor

2018-07-10 Thread QI Fuli
This patch is used to add manpage for ndctl monitor command. Signed-off-by: QI Fuli --- Documentation/ndctl/Makefile.am | 3 +- Documentation/ndctl/ndctl-monitor.txt | 96 +++ 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 Documentation/ndctl

RE: [ndctl PATCH v10 1/4] ndctl, monitor: add a new command - monitor

2018-07-10 Thread Qi, Fuli
> -Original Message- > From: Masayoshi Mizuma [mailto:msys.miz...@gmail.com] > Sent: Wednesday, July 11, 2018 5:19 AM > To: Qi, Fuli/斉 福利 ; linux-nvdimm@lists.01.org > Subject: Re: [ndctl PATCH v10 1/4] ndctl, monitor: add a new command - monitor > > > On 07/0

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

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

[ndctl PATCH v10 1/4] ndctl, monitor: add a new command - monitor

2018-07-09 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/lib/libndctl.c | 82 +++ ndctl/lib/libndctl.sym | 4 + ndctl/libndctl.h | 10

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

2018-07-09 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

[ndctl PATCH v10 2/4] ndctl, monitor: add main ndctl monitor configuration file

2018-07-09 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

[ndctl PATCH v10 4/4] ndctl, documentation: add manpage for monitor

2018-07-09 Thread QI Fuli
This patch is used to add manpage for ndctl monitor command. Signed-off-by: QI Fuli --- Documentation/ndctl/Makefile.am | 3 +- Documentation/ndctl/ndctl-monitor.txt | 96 +++ 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 Documentation/ndctl

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

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

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

2018-07-09 Thread Qi, Fuli
Hi Dan, Thanks for your comments. > -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Sunday, July 8, 2018 3:56 AM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [ndctl PATCH v3] ndctl, test: add a new unit test for monitor >

RE: [PATCH v9 1/3] ndctl, monitor: add ndctl monitor

2018-07-09 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Monday, July 9, 2018 3:27 PM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [PATCH v9 1/3] ndctl, monitor: add ndctl monitor > > On Sun, Jul 8, 2018 at 1

RE: [PATCH v9 1/3] ndctl, monitor: add ndctl monitor

2018-07-09 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Monday, July 9, 2018 3:04 PM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [PATCH v9 1/3] ndctl, monitor: add ndctl monitor > > On Sun, Jul 8, 2018 at 9:59 PM, Qi, Fuli w

RE: [PATCH v9 1/3] ndctl, monitor: add ndctl monitor

2018-07-08 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Sunday, July 8, 2018 5:06 AM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [PATCH v9 1/3] ndctl, monitor: add ndctl monitor > > On Thu, Jun 28, 2018 at 7:30 PM, QI Fuli

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

2018-07-06 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 Signed-off-by: QI Fuli --- v2 -> v3: - Add filter_obj instead of hard-coded values v1 -> v2: - Ad

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

2018-07-06 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Saturday, July 7, 2018 12:58 PM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [ndctl PATCH v2] ndctl, test: add a new unit test for monitor > > On Thu, Jul 5, 2018 at

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

2018-07-06 Thread QI Fuli
Hi Masa, Thank you for your comments. On 7/7/2018 12:08 AM, Masayoshi Mizuma wrote: Hi Qi, On 07/06/2018 01:22 AM, QI Fuli wrote: Add a new unit test to test the following options of the monitor command. --dimm --bus --region --namespace --logfile --config-file Based

[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

[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

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

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

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

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

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

2018-06-28 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 v9 2/3] ndctl, monitor: add main ndctl monitor configuration file

2018-06-28 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 v9 1/3] ndctl, monitor: add ndctl monitor

2018-06-28 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/lib/libndctl.sym | 1 + ndctl/lib/smart.c | 17 ++ ndctl/libndctl.h | 6

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

2018-06-27 Thread Qi, Fuli
> -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Thursday, June 28, 2018 12:53 PM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [PATCH v8 1/3] ndctl, monitor: add ndctl monitor > > On Wed, Jun 27, 2018 at 8:02 PM, Qi,

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

2018-06-27 Thread Qi, Fuli
Thanks for your comments. > -Original Message- > From: Dan Williams [mailto:dan.j.willi...@intel.com] > Sent: Thursday, June 28, 2018 12:09 AM > To: Qi, Fuli/斉 福利 > Cc: linux-nvdimm > Subject: Re: [PATCH v8 1/3] ndctl, monitor: add ndctl monitor > > On Tue, Jun

[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

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 >

[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

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] 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 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

[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

  1   2   >