diff --git a/pd-control.md b/pd-control.md index 9b797d71e84ce..c1de6aa5204f5 100644 --- a/pd-control.md +++ b/pd-control.md @@ -8,16 +8,13 @@ aliases: ['/docs/stable/pd-control/','/docs/v4.0/pd-control/','/docs/stable/refe As a command line tool of PD, PD Control obtains the state information of the cluster and tunes the cluster. -## Compile from source code +## Install PD Control -1. [Go](https://golang.org/) Version 1.13 or later because the Go modules are used. -2. In the root directory of the [PD project](https://github.com/pingcap/pd), use the `make` command to compile and generate `bin/pd-ctl` +### Use TiUP command -> **Note:** -> -> Generally, you don't need to compile source code as the PD Control tool already exists in the released Binary or Docker. However, dev users can refer to the above instruction for compiling source code. +To use PD Control, execute the `tiup ctl pd -- -u http://: [-i]` command. -## Download TiDB installation package +### Download TiDB installation package If you want to download the latest version of `pd-ctl`, directly download the TiDB package, because `pd-ctl` is included in the TiDB package. @@ -27,7 +24,12 @@ If you want to download the latest version of `pd-ctl`, directly download the Ti > **Note:** > -> `{version}` indicates the version number of TiDB. For example, if `{version}` is `v3.0.7`, the package download link is `https://download.pingcap.org/tidb-v3.0.7-linux-amd64.tar.gz`. You can also download the latest unpublished version by replacing `{version}` with `latest`. +> `{version}` indicates the version number of TiDB. For example, if `{version}` is `v4.0.0-rc.2`, the package download link is `https://download.pingcap.org/tidb-v4.0.0-rc.2-linux-amd64.tar.gz`. You can also download the latest unpublished version by replacing `{version}` with `latest`. + +### Compile from source code + +1. [Go](https://golang.org/) Version 1.13 or later because the Go modules are used. +2. In the root directory of the [PD project](https://github.com/pingcap/pd), use the `make` or `make pd-ctl` command to compile and generate `bin/pd-ctl`. ## Usage @@ -58,43 +60,43 @@ Use TLS to encrypt: ## Command line flags -### --cacert +### `--cacert` + Specifies the path to the certificate file of the trusted CA in PEM format + Default: "" -### --cert +### `--cert` + Specifies the path to the certificate of SSL in PEM format + Default: "" -### \-\-detach,-d +### `--detach` / `-d` + Uses the single command line mode (not entering readline) + Default: true -### \-\-help,-h +### `--help` / `-h` + Outputs the help information + Default: false -### \-\-interact,-i +### `--interact` / `-i` + Uses the interactive mode (entering readline) + Default: false -### --key +### `--key` + Specifies the path to the certificate key file of SSL in PEM format, which is the private key of the certificate specified by `--cert` + Default: "" -### \-\-pd,-u +### `--pd` / `-u` + Specifies the PD address + Default address: `http://127.0.0.1:2379` + Environment variable: `PD_ADDR` -### --version,-V +### `--version` / `-V` + Prints the version information and exit + Default: false @@ -115,7 +117,7 @@ Usage: } ``` -### `config [show | set