cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Heming Zhao <heming.zhao@suse.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 4/5] dlm_tool man: add new command set_config
Date: Sat, 25 Sep 2021 22:21:41 +0800	[thread overview]
Message-ID: <20210925142142.1821-5-heming.zhao@suse.com> (raw)
In-Reply-To: <20210925142142.1821-1-heming.zhao@suse.com>

Signed-off-by: Heming Zhao <heming.zhao@suse.com>
---
 dlm_tool/dlm_tool.8 | 89 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 89 insertions(+)

diff --git a/dlm_tool/dlm_tool.8 b/dlm_tool/dlm_tool.8
index e1242308302f..e6012315f082 100644
--- a/dlm_tool/dlm_tool.8
+++ b/dlm_tool/dlm_tool.8
@@ -32,6 +32,10 @@ dlm_tool \- a utility for the dlm and dlm_controld daemon
 .br
 	Reload dlm_controld config settings from dlm.conf.
 
+.B set_config
+.br
+	Set dlm_controld config settings on the fly.
+
 .BI fence_ack " nodeid"
 .br
 	Quit trying to fence a node.
@@ -145,6 +149,13 @@ see examples in \fBdlm.conf(5)\fP
 
 -
 
+dlm_tool set_config "dlm_controld-config-item=x"
+.RS 4
+see below \fBEXAMPLES\fP section
+.RE
+
+-
+
 dlm_tool fence_ack \fIls-name\fP
 
 -
@@ -202,6 +213,84 @@ dlm_tool -h
 
 dlm_tool -V
 
+.SH EXAMPLES
+
+command \fIdlm_tool set_config "xxx"\fP can do the dynamic config job. It makes possible to debug, or to do flexible operations on the fly.
+
+If the line of "dlm_tool dump_config" output leading with "(*)", the START symbol, it indicates this item supports dynamic config.
+.br
+i.e.
+
+.RS 4
+.EX
+# dlm_tool dump_config | grep log_debug
+(*-) log_debug=1
+.EE
+
+The "log_debug" supports dynamic setting.
+.br
+The '-' (minus) means dynamic config doesn't take effect on this item.
+.br
+If "(*-)" becomes "(*+)", it means this item is dynamically changed on the fly.
+.RE
+
+
+Below show more usage
+
+.RS 4
+.EX
+Default log_debug is 0, we use "set_config" to change to 1.
+.br
+
+# dlm_tool dump_config | grep log_debug
+(*-) log_debug=0
+# dlm_tool set_config "log_debug=1"
+Issue set_config done.
+# dlm_tool dump_config | grep log_debug
+(*+) log_debug=1
+
+Default log_debug is 0, we do "set_config", it will overwrite with 0.
+"dump_config" show "(*+)" to indicate this option had been changed by set_config.
+.br
+
+# dlm_tool dump_config | grep log_debug
+(*-) log_debug=0
+# dlm_tool set_config "log_debug=0"
+Issue set_config done.
+# dlm_tool dump_config | grep log_debug
+(*+) log_debug=0
+
+We use "restore" to reset dlm_controld setting. change status "(*)" to "(*-)"
+.br
+
+# dlm_tool dump_config | grep log_debug
+(*+) log_debug=0
+# dlm_tool set_config "log_debug=restore"
+# dlm_tool dump_config | grep log_debug
+(*-) log_debug=0
+
+Below we use "restore_all" to reset all dynamic settings in one command
+.br
+
+# dlm_tool dump_config | grep _debug
+(*-) daemon_debug=0
+(*-) log_debug=0
+(*-) plock_debug=0
+# dlm_tool set_config "daemon_debug=1 log_debug=1"
+Issue set_config done.
+# dlm_tool dump_config | grep _debug
+(*+) daemon_debug=1
+(*+) log_debug=1
+(*-) plock_debug=0
+# dlm_tool set_config "restore_all"
+Issue set_config done.
+# dlm_tool dump_config | grep _debug
+(*-) daemon_debug=0
+(*-) log_debug=0
+(*-) plock_debug=0
+.EE
+.RE
+
 .SH SEE ALSO
 .BR dlm_controld (8),
 .BR dlm.conf (5)
-- 
2.32.0




  parent reply	other threads:[~2021-09-25 14:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25 14:21 [Cluster-devel] [RFC PATCH 0/5] add new command reload_config set_config Heming Zhao
2021-09-25 14:21 ` [Cluster-devel] [PATCH 1/5] dlm_tool man: add command "joinleave", add "USAGE" section Heming Zhao
2021-09-25 14:21 ` [Cluster-devel] [PATCH 2/5] man: add reload_config in dlm_tool & dlm.conf Heming Zhao
2021-09-25 14:21 ` [Cluster-devel] [PATCH 3/5] dlm_controld: add reload_config feature Heming Zhao
2021-09-25 14:21 ` Heming Zhao [this message]
2021-09-25 14:21 ` [Cluster-devel] [PATCH 5/5] dlm_controld: add new feature set_config Heming Zhao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210925142142.1821-5-heming.zhao@suse.com \
    --to=heming.zhao@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).