# Using TiUP

__*Using TiUP*__
__*TiUP command*__
__*TiUP component*__
__*zz-BGL*__

+ Execute command
  + **`tiup [{flags}] {command} [{args}...]`**
+ Run component, such as playground, client, and cluster.
  + **`tiup [{flags}] {component} [{args}...]`**
+ Example:
```
~!@// Command@!~
$ tiup list --installed
$ tiup install tidb

~!@// Component@!~
$ tiup cluster check my-cluster
```

-------------------------------------------------------------
`{command}` Represents the command name. For a list of supported commands, please refer to the command list below:
- `install`: Install components
- `list`: View the list of components
- `uninstall`: Uninstall components
- `update`: Upgrades installed components
- `status`: Check the operational status of the component
- `clean`: Clean the component data directory
- `mirror`: Image management
- `telemetry`: Telemetry Switch
- `completion`: `TiUP` command completion
- `env`: View `TiUP` related environment variables
- `help`: View the help documentation for a specific command or component

`{component}` Represents the component name. For a list of supported components, please refer to the following list of components:
- `cluster`: `TiDB` cluster management for production environments
- `dm`: `TiDB Data Migration (DM)` cluster management for production environments

The difference between commands and components is that commands come with `TiUP` and are used for package management operations. Components, on the other hand, are separate component packages that `TiUP` installs through package management operations.
```
$ tiup list --installed

Available components:
Name        Owner    Description
----        -----    -----------
cdc         pingcap  CDC is a change data capture tool for TiDB
cluster     pingcap  Deploy a TiDB cluster for production
grafana     pingcap  Grafana is the open source analytics & monitoring solution for every database
pd          pingcap  PD is the abbreviation for Placement Driver. It is used to manage and schedule the TiKV cluster
playground  pingcap  Bootstrap a local TiDB cluster for fun
prometheus  pingcap  The Prometheus monitoring system and time series database
tidb        pingcap  TiDB is an open source distributed HTAP database compatible with the MySQL protocol
tiflash     pingcap  The TiFlash Columnar Storage Engine
tikv        pingcap  Distributed transactional key-value database, originally created to complement TiDB
```

```
$ tiup install tidb

download https://tiup-mirrors.pingcap.com/tidb-v6.2.0-darwin-arm64.tar.gz 47.93 MiB / 47.93 MiB 100.00% 2.54 MiB/s   
```

```
$ tiup cluster check ./topology.yaml --user root -p
Node          Check         Result  Message
----          -----         ------  -------
172.31.0.215  exist         Fail    /tidb-deploy/tikv-20160 already exists
172.31.0.215  exist         Fail    /tidb-data/tikv-20160 already exists
172.31.0.215  exist         Fail    /tidb-deploy/tikv-20160/log already exists
172.31.0.215  cpu-governor  Warn    Unable to determine current CPU frequency governor policy
172.31.0.215  memory        Pass    memory size is 8192MB
172.31.0.215  command       Pass    numactl: policy: default
...
172.31.0.34   thp           Pass    THP is disabled
172.31.0.34   exist         Fail    /tidb-deploy/tikv-20160 already exists
172.31.0.34   exist         Fail    /tidb-data/tikv-20160 already exists
172.31.0.34   exist         Fail    /tidb-deploy/tikv-20160/log already exists
172.31.0.34   os-version    Pass    OS is CentOS Linux 7 (Core) 7.6.1810
172.31.0.34   memory        Pass    memory size is 8192MB
172.31.0.34   disk          Fail    mount point / does not have 'nodelalloc' option set
```