From 832ebd8970ad886130c2e89c1b25bcf1e5f3ee61 Mon Sep 17 00:00:00 2001 From: yikeke Date: Fri, 17 Jul 2020 17:39:09 +0800 Subject: [PATCH 1/6] Update pd-control.md --- pd-control.md | 298 +++++++++++++++++++++++++++++++------------------- 1 file changed, 184 insertions(+), 114 deletions(-) diff --git a/pd-control.md b/pd-control.md index bc8aa95c45c9d..d2e3f00819f0e 100644 --- a/pd-control.md +++ b/pd-control.md @@ -8,16 +8,13 @@ aliases: ['/docs/dev/pd-control/','/docs/dev/reference/tools/pd-control/'] As a command line tool of PD, PD Control obtains the state information of the cluster and tunes the cluster. -## Compile from source code +## Installation methods -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 @@ -68,17 +70,17 @@ Use TLS to encrypt: + 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 @@ -88,7 +90,7 @@ Use TLS to encrypt: + 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` @@ -115,7 +117,7 @@ Usage: } ``` -### `config [show | set