From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heming Zhao Date: Sat, 25 Sep 2021 22:21:41 +0800 Subject: [Cluster-devel] [PATCH 4/5] dlm_tool man: add new command set_config In-Reply-To: <20210925142142.1821-1-heming.zhao@suse.com> References: <20210925142142.1821-1-heming.zhao@suse.com> Message-ID: <20210925142142.1821-5-heming.zhao@suse.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Signed-off-by: Heming Zhao --- 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