linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
* [ndctl,RFC 0/3] Enable to run multiple monitor daemons as system services
@ 2020-02-25  6:52 Keisuke Sugita
  2020-02-25  6:52 ` [ndctl,RFC 1/3] ndctl: ndctl-monitor.txt: Write how to use multiple monitor daemon concullently Keisuke Sugita
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Keisuke Sugita @ 2020-02-25  6:52 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Keisuke Sugita

Hello, this is my first OSS contribution!

This patch is to monitor specific dimms, regions, buses,
namespaces, or dimm-events where users set up to monitor
independently and concurrently by running multiple monitor
daemons as system services.

Users will be able to monitor multiple elements and check each log file
by this patch.

So far, users can only run a single monitor daemon because units name
is fixed to "ndctl-monitor.service" now, and then users cannot monitor
multiple elements concurrently. For example, users want to monitor
a specific bus and namespace, but they are not able to do now.

I solve this problem by instance name of systemd.

Keisuke Sugita (3):
  ndctl: Documentation: Write how to use multiple monitor daemon concullently
  ndctl: ndctl-monitor@.service: Add new unit file for multi daemon support
  ndctl: Makefile.am: make ndctl-monitor@.service in compiling

 Documentation/ndctl/ndctl-monitor.txt | 11 +++++++++++
 ndctl/Makefile.am                     |  1 +
 ndctl/ndctl-monitor@.service          |  9 +++++++++
 3 files changed, 21 insertions(+)
 create mode 100644 ndctl/ndctl-monitor@.service

-- 
2.24.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

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

* [ndctl,RFC 1/3] ndctl: ndctl-monitor.txt: Write how to use multiple monitor daemon concullently
  2020-02-25  6:52 [ndctl,RFC 0/3] Enable to run multiple monitor daemons as system services Keisuke Sugita
@ 2020-02-25  6:52 ` Keisuke Sugita
  2020-02-25  6:52 ` [ndctl,RFC 2/3] ndctl: ndctl-monitor@.service: Add new unit file for multi daemon support Keisuke Sugita
  2020-02-25  6:52 ` [ndctl,RFC 3/3] ndctl: Makefile.am: make ndctl-monitor@.service in compiling Keisuke Sugita
  2 siblings, 0 replies; 4+ messages in thread
From: Keisuke Sugita @ 2020-02-25  6:52 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Keisuke Sugita

Add how to use multiple monitor concullently into monitor-conf.txt.

Here is a simple example of how to use,

1. copy and edit a config file
$ cp /etc/ndctl/monitor.conf /etc/ndctl/monitor-dimm.conf
$ vi /etc/ndctl/monitor-dimm.conf

2. start sytsem services
$ systemctl start ndctl-monitor@dimm

Signed-off-by: Keisuke Sugita <fj5788hd@fujitsu.com>
---
 Documentation/ndctl/ndctl-monitor.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/Documentation/ndctl/ndctl-monitor.txt b/Documentation/ndctl/ndctl-monitor.txt
index 2239f04..ccca2f0 100644
--- a/Documentation/ndctl/ndctl-monitor.txt
+++ b/Documentation/ndctl/ndctl-monitor.txt
@@ -45,6 +45,17 @@ Run a monitor daemon as a system service
 [verse]
 systemctl start ndctl-monitor.service
 
+Run multiple monitor daemon concurrently as system services to monitor
+multiple bus, dimm, region, namespace or dimm-event independently.
+Same name as the single argument must be used with config file,
+like "ndctl-monitor@foo.service" and "moniter-foo.conf".
+
+For example, when you want to monitor a specific dimm,
+[verse]
+cp /etc/ndctl/monitor.conf /etc/ndctl/monitor-dimm.conf
+vi /etc/ndctl/monitor-dimm.conf  #Edit a file as you need
+systemctl start ndctl-monitor@dimm.service
+
 OPTIONS
 -------
 -b::
-- 
2.24.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

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

* [ndctl,RFC 2/3] ndctl: ndctl-monitor@.service: Add new unit file for multi daemon support
  2020-02-25  6:52 [ndctl,RFC 0/3] Enable to run multiple monitor daemons as system services Keisuke Sugita
  2020-02-25  6:52 ` [ndctl,RFC 1/3] ndctl: ndctl-monitor.txt: Write how to use multiple monitor daemon concullently Keisuke Sugita
@ 2020-02-25  6:52 ` Keisuke Sugita
  2020-02-25  6:52 ` [ndctl,RFC 3/3] ndctl: Makefile.am: make ndctl-monitor@.service in compiling Keisuke Sugita
  2 siblings, 0 replies; 4+ messages in thread
From: Keisuke Sugita @ 2020-02-25  6:52 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Keisuke Sugita

Users cannot run multiple monitor daemon because units name of
monitor daemon is now fixed to "ndctl-monitor.service" and users cannnot
change this name.

This patch is new unit file which reffers a single argument and change
their config file or service name. This is to run multiple monitor
daemon.

Units name can be parameterized by a single argument called the instance
name. The name of the full units is formed by inserting the instance
name between "@" and ".service", like "ndctl-moniter@foo.service".

In the unit file itself, the instance parameter may be referred to using
"%I". And each daemon reads each config file, like "monitor-foo.conf".
Same name as instance name must be used in config file between
"monitor" and ".conf".

Signed-off-by: Keisuke Sugita <fj5788hd@fujitsu.com>
---
 ndctl/ndctl-monitor@.service | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100644 ndctl/ndctl-monitor@.service

diff --git a/ndctl/ndctl-monitor@.service b/ndctl/ndctl-monitor@.service
new file mode 100644
index 0000000..eb10702
--- /dev/null
+++ b/ndctl/ndctl-monitor@.service
@@ -0,0 +1,9 @@
+[Unit]
+Description=Ndctl Monitor Daemon
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/ndctl monitor --config-file=/etc/ndctl/monitor-%I.conf
+
+[Install]
+WantedBy=multi-user.target
-- 
2.24.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

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

* [ndctl,RFC 3/3] ndctl: Makefile.am: make ndctl-monitor@.service in compiling
  2020-02-25  6:52 [ndctl,RFC 0/3] Enable to run multiple monitor daemons as system services Keisuke Sugita
  2020-02-25  6:52 ` [ndctl,RFC 1/3] ndctl: ndctl-monitor.txt: Write how to use multiple monitor daemon concullently Keisuke Sugita
  2020-02-25  6:52 ` [ndctl,RFC 2/3] ndctl: ndctl-monitor@.service: Add new unit file for multi daemon support Keisuke Sugita
@ 2020-02-25  6:52 ` Keisuke Sugita
  2 siblings, 0 replies; 4+ messages in thread
From: Keisuke Sugita @ 2020-02-25  6:52 UTC (permalink / raw)
  To: linux-nvdimm; +Cc: Keisuke Sugita

This patch is to make the new unit file "ndctl-moniotr@.service"
in the directory "/usr/lib/systemd/system/".

Signed-off-by: Keisuke Sugita <fj5788hd@fujitsu.com>
---
 ndctl/Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ndctl/Makefile.am b/ndctl/Makefile.am
index 03c9bcc..74bf493 100644
--- a/ndctl/Makefile.am
+++ b/ndctl/Makefile.am
@@ -69,4 +69,5 @@ monitor_config_DATA = $(ndctl_monitorconf)
 
 if ENABLE_SYSTEMD_UNITS
 systemd_unit_DATA = ndctl-monitor.service
+systemd_unit_DATA = ndctl-monitor@.service
 endif
-- 
2.24.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

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

end of thread, other threads:[~2020-02-25  6:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25  6:52 [ndctl,RFC 0/3] Enable to run multiple monitor daemons as system services Keisuke Sugita
2020-02-25  6:52 ` [ndctl,RFC 1/3] ndctl: ndctl-monitor.txt: Write how to use multiple monitor daemon concullently Keisuke Sugita
2020-02-25  6:52 ` [ndctl,RFC 2/3] ndctl: ndctl-monitor@.service: Add new unit file for multi daemon support Keisuke Sugita
2020-02-25  6:52 ` [ndctl,RFC 3/3] ndctl: Makefile.am: make ndctl-monitor@.service in compiling Keisuke Sugita

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