diff --git a/pd-control.md b/pd-control.md index 638ea2153f14..14c60cce8a25 100644 --- a/pd-control.md +++ b/pd-control.md @@ -8,10 +8,9 @@ aliases: ['/docs-cn/dev/reference/tools/pd-control/'] PD Control 是 PD 的命令行工具,用于获取集群状态信息和调整集群。 -## 源码编译 +## 使用 TiUP -1. [Go](https://golang.org/) Version 1.9 以上 -2. 在 PD 项目根目录使用 `make` 命令进行编译,生成 bin/pd-ctl +可直接通过 `tiup ctl pd -- -u http://: [-i]` 使用。 ## 下载安装包 @@ -23,7 +22,12 @@ PD Control 是 PD 的命令行工具,用于获取集群状态信息和调整 > **注意:** > -> 下载链接中的 `{version}` 为 TiDB 的版本号。例如 `v3.0.5` 版本的下载链接为 `https://download.pingcap.org/tidb-v3.0.5-linux-amd64.tar.gz`。也可以使用 `latest` 替代 `{version}` 来下载最新的未发布版本。 +> 下载链接中的 `{version}` 为 TiDB 的版本号。例如 `v4.0.0-rc.2` 版本的下载链接为 `https://download.pingcap.org/tidb-v4.0.0-rc.2-linux-amd64.tar.gz`。也可以使用 `latest` 替代 `{version}` 来下载最新的未发布版本。 + +## 源码编译 + +1. [Go](https://golang.org/) Version 1.13 以上 +2. 在 PD 项目根目录使用 `make` 或者 `make pd-ctl` 命令进行编译,生成 bin/pd-ctl ## 简单例子 @@ -72,17 +76,17 @@ export PD_ADDR=http://127.0.0.1:2379 && - 指定 PEM 格式的 SSL 证书的文件路径 - 默认值:"" -### \-\-detach,-d +### --detach,-d + 使用单命令行模式(不进入 readline) + 默认值: true -### \-\-help,-h +### --help,-h + 输出帮助信息 + 默认值:false -### \-\-interact,-i +### --interact,-i + 使用交互模式(进入 readline) + 默认值:false @@ -92,7 +96,7 @@ export PD_ADDR=http://127.0.0.1:2379 && - 指定 PEM 格式的 SSL 证书密钥文件路径,即 `--cert` 所指定的证书的私钥 - 默认值: "" -### \-\-pd,-u +### --pd,-u + 指定 PD 的地址 + 默认地址:`http://127.0.0.1:2379` @@ -124,7 +128,7 @@ export PD_ADDR=http://127.0.0.1:2379 && } ``` -### config [show | set \