From d2b9479dda2b2398f0c0cbcb488a380c3aa03dd7 Mon Sep 17 00:00:00 2001 From: glorv Date: Wed, 27 Jul 2022 13:03:10 +0800 Subject: [PATCH] tikv: add command line flag `--config-info` (#10615) --- command-line-flags-for-tikv-configuration.md | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/command-line-flags-for-tikv-configuration.md b/command-line-flags-for-tikv-configuration.md index 9975808c631b..943fd39c8e5c 100644 --- a/command-line-flags-for-tikv-configuration.md +++ b/command-line-flags-for-tikv-configuration.md @@ -49,6 +49,31 @@ TiKV 的命令行参数支持一些可读性好的单位转换。 + 默认:0(无限) + PD 需要使用这个值来对整个集群做 balance 操作。(提示:你可以使用 10GB 来替代 10737418240,从而简化参数的传递)。 +## `--config-info ` + ++ 按照指定的 `FORMAT` 输出各个配置项的取值信息并退出。 ++ `FORMAT` 可选值:`json`。 ++ 目前仅支持以 JSON 格式输出每个配置项的名字 (Name)、默认值 (DefaultValue) 和当前配置值 (ValueInFile)。当执行此命令时,若同时指定了 `-C` 或 `--config` 参数,则对应的配置文件包含的配置项会同时输出当前配置值和默认值,其他未指定的配置项仅输出默认值,示例如下: + +```json +{ + "Component": "TiKV Server", + "Version": "6.2.0", + "Parameters": [ + { + "Name": "log-level", + "DefaultValue": "info", + "ValueInFile": "warn" + }, + { + "Name": "log-file", + "DefaultValue": "" + }, + ... + ] + } +``` + ## `--data-dir` + TiKV 数据存储路径。