nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/4] ndctl, monitor: add ndctl monitor daemon
@ 2018-05-07  5:09 QI Fuli
  2018-05-07  5:09 ` [PATCH v6 1/4] ndctl, util: add OPTION_FILENAME to parse_opt_type QI Fuli
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: QI Fuli @ 2018-05-07  5:09 UTC (permalink / raw)
  To: linux-nvdimm

This is the v6 patch for ndctl monitor daemon, a tiny daemon to monitor
the smart events of nvdimm DIMMs. Users can run a monitor as a one-shot
command or a daemon in background by using the [--daemon] option. DIMMs
to monitor can be selected by [--dimm] [--bus] [--region] [--namespace]
options, these options support multiple space-seperated arguments.
When a smart event fires, monitor daemon will log the notifications
which including dimm health status to syslog or a logfile by setting
[--logfile=<file|syslog>] option. monitor also can output the
notifications to stderr when it run as one-shot command by setting
[--logfile=<stderr>]. The notifications follow json format and can be
consumed by log collectors like Fluentd. Users can change the
configuration of monitor by editing the default configuration file
/etc/ndctl/monitor.conf or by using [--config-file=<file>] option to
override the default configuration. 

Users can start a monitor daemon by the following command:
 # ndctl monitor --daemon --logfile /var/log/ndctl/monitor.log

Also, a monitor daemon can be started by systemd:
 # systemctl start ndctl-monitor.service
In this case, monitor daemon follows the default configuration file
/etc/ndctl/monitor.conf.

Signed-off-by: QI Fuli <qi.fuli@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 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 (4):
  ndctl, util: add OPTION_FILENAME to parse_opt_type
  ndctl, monitor: add ndctl monitor daemon
  ndctl, monitor: add default configuration file
  ndctl, monitor: add the unit file of systemd for ndctl-monitor service

 Makefile.am                 |   3 +-
 autogen.sh                  |   3 +-
 builtin.h                   |   1 +
 configure.ac                |  22 ++
 ndctl/Makefile.am           |  12 +-
 ndctl/monitor.c             | 460 ++++++++++++++++++++++++++++++++++++
 ndctl/monitor.conf          |  37 +++
 ndctl/ndctl-monitor.service |   7 +
 ndctl/ndctl.c               |   1 +
 util/abspath.c              |  29 +++
 util/help.c                 |   5 -
 util/parse-options.c        |  47 +++-
 util/parse-options.h        |  11 +-
 util/util.h                 |   7 +
 14 files changed, 629 insertions(+), 16 deletions(-)
 create mode 100644 ndctl/monitor.c
 create mode 100644 ndctl/monitor.conf
 create mode 100644 ndctl/ndctl-monitor.service
 create mode 100644 util/abspath.c

-- 
2.17.0.140.g0b0cc9f86


_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-06-12 23:52 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07  5:09 [PATCH v6 0/4] ndctl, monitor: add ndctl monitor daemon QI Fuli
2018-05-07  5:09 ` [PATCH v6 1/4] ndctl, util: add OPTION_FILENAME to parse_opt_type QI Fuli
2018-05-11 16:42   ` Dan Williams
2018-05-16  2:42     ` Qi, Fuli
2018-06-12 22:45       ` Verma, Vishal L
2018-06-12 23:51         ` Qi, Fuli
2018-05-07  5:09 ` [PATCH v6 2/4] ndctl, monitor: add ndctl monitor daemon QI Fuli
2018-05-11 18:45   ` Dan Williams
2018-05-15  8:32     ` Qi, Fuli
2018-05-15 17:07       ` Dan Williams
2018-05-16  2:44         ` Qi, Fuli
2018-05-25  8:49     ` Qi, Fuli
2018-05-31 22:23       ` Dan Williams
2018-05-07  5:09 ` [PATCH v6 3/4] ndctl, monitor: add default configuration file QI Fuli
2018-05-07  5:09 ` [PATCH v6 4/4] ndctl, monitor: add the unit file of systemd for ndctl-monitor service QI Fuli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).