---
title: "yb-ts-cli"
url: "https://docs.yugabyte.com/stable/admin/yb-ts-cli/"
---

# yb-ts-cli

Use the yb-ts-cli command line utility to perform advanced YB-TServer operations.

yb-ts-cli is a command line tool that can be used to perform an operation on a particular tablet server ([yb-tserver](/stable/reference/configuration/yb-tserver/ "yb-tserver")). Some of the commands perform operations similar to [yb-admin commands](/stable/admin/yb-admin/ "yb-admin commands"). The yb-admin commands focus on cluster administration, the yb-ts-cli commands apply to specific YB-TServer nodes.

yb-ts-cli is a binary file installed with YugabyteDB and is located in the `bin` directory of the YugabyteDB home directory.

## Syntax

```sh
yb-ts-cli [ --server_address=<host>:<port> ] <command> <flags>
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- *command*: The operation to be performed. See [Commands](#commands "Commands").
- *flags*: The flags to be applied to the command. See [Flags](#flags "Flags").

### Online help

To display the available online help, run yb-ts-cli without any commands or flags at the YugabyteDB home directory.

```sh
./bin/yb-ts-cli
```

## Commands

### are\_tablets\_running

If all tablets are running, returns "All tablets are running".

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] are_tablets_running
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.

### cdc\_release\_barriers\_on\_tablet

Available in v2025.2.4.0 and later.

Releases [CDC retention barriers](/stable/additional-features/change-data-capture/using-logical-replication/advanced-configuration/#retention-of-resources "CDC retention barriers") on the specified tablet on the target YB-TServer. Use this command when CDC retention barriers remain on a tablet after a replication slot or CDC stream is dropped.

Run the command against every YB-TServer that hosts a peer for the tablet. Obtain the tablet ID using [list\_tablets](/stable/admin/yb-admin/#list-tablets "list_tablets") command.

Warning

This is an operational troubleshooting command. Use it only when CDC retention barriers are stuck on a specific tablet and normal barrier advancement (for example, after dropping the slot) does not release them.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] cdc_release_barriers_on_tablet <tablet-id>
```

- *host*:*port*: The *host* and *port* of the YB-TServer that hosts the tablet. Default is `localhost:9100`.
- *tablet-id*: The identifier of the tablet on which to release CDC retention barriers.

On success, the command prints a confirmation that CDC retention barriers were released on the tablet at the specified peer.

### clear\_server\_metacache

Clears all metacaches that are stored on a specified server. Works on both YB-Master (port 9100) and YB-TServer (port 7100) processes. Tablet servers and masters use MetaCaches to cache information about which tablet server hosts which tablet. Because these caches could become stale in some cases, you may want to use this command to clear the MetaCaches on a particular tablet server or master.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] clear_server_metacache
```

- *host*:*port*: The *host* and *port* of the tablet/master server. Default is `localhost:9100`.

### compact\_all\_tablets

Compact all tablets on the tablet server. By default, compaction also includes all [vector indexes](/stable/additional-features/pg-extensions/extension-pgvector/#vector-indexing "vector indexes") (pgvector) on each tablet. Vector index compaction can be significantly heavier than RocksDB compaction for a tablet of the same size; use [--exclude\_vector\_indexes](#exclude-vector-indexes "--exclude_vector_indexes") to skip vector indexes.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] [ --exclude_vector_indexes ] compact_all_tablets
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- [--exclude\_vector\_indexes](#exclude-vector-indexes "--exclude_vector_indexes"): Optional. Exclude vector indexes from compaction.

### compact\_tablet

Compact the specified tablet on the tablet server. By default, compaction also includes all [vector indexes](/stable/additional-features/pg-extensions/extension-pgvector/#vector-indexing "vector indexes") (pgvector) on the tablet. Vector index compaction can be significantly heavier than RocksDB compaction for a tablet of the same size; use [--exclude\_vector\_indexes](#exclude-vector-indexes "--exclude_vector_indexes") to skip vector indexes. To compact only vector indexes, use [compact\_vector\_index](#compact-vector-index "compact_vector_index").

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] [ --exclude_vector_indexes ] compact_tablet <tablet-id>
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- [--exclude\_vector\_indexes](#exclude-vector-indexes "--exclude_vector_indexes"): Optional. Exclude vector indexes from compaction.
- *tablet-id*: The identifier of the tablet to compact.

### compact\_vector\_index

Trigger compaction of [vector indexes](/stable/additional-features/pg-extensions/extension-pgvector/#vector-indexing "vector indexes") (pgvector) on a specific tablet. Use this for tablet-level vector index compaction when you need to compact only vector indexes on a given tablet (for example, after bulk loads or for maintenance).

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] compact_vector_index <tablet-id> [<vector-index-id1> <vector-index-id2> ...]
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- *tablet-id*: The identifier of the tablet that contains the vector index(es).
- *vector-index-id1*, *vector-index-id2*, ...: Optional. Table IDs of specific vector indexes to compact. If omitted, all vector indexes on the tablet are compacted.

### count\_intents

Print the count of uncommitted intents (or [provisional records](/stable/architecture/transactions/distributed-txns/#provisional-records "provisional records")). Helpful for debugging transactional workloads.

**Syntax**

```sh
yb-ts-cli  [ --server_address=<host>:<port> ] count_intents
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.

### current\_hybrid\_time

Prints the value of the current [hybrid time](/stable/architecture/transactions/transactions-overview/#hybrid-logical-clocks "hybrid time").

**Syntax**

```sh
yb-ts-cli  [ --server_address=<host>:<port> ] current_hybrid_time
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.

### delete\_tablet

Deletes the tablet with the specified tablet ID (`tablet-id`) and reason.

**Syntax**

```sh
yb-ts-cli  [ --server_address=<host>:<port> ] delete_tablet <tablet-id> "<reason-string>"
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- *tablet-id*: The identifier (ID) for the tablet.
- *reason-string*: Text string providing information on why the tablet was deleted.

### dump\_tablet

Dump, or export, the specified tablet ID (`tablet-id`).

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] dump_tablet <tablet-id>
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- *tablet-id*: The identifier (ID) for the tablet.

### flush\_all\_tablets

Flush all tablets on the tablet server.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] flush_all_tablets
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.

### flush\_tablet

Flush the specified tablet on the tablet server.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] flush_tablet <tablet-id>
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- *tablet-id*: The identifier of the tablet to flush.

### flush\_vector\_index

Trigger a flush of [vector indexes](/stable/additional-features/pg-extensions/extension-pgvector/#vector-indexing "vector indexes") (pgvector) on a specific tablet. Use this for tablet-level vector index flush when you need to flush only vector indexes on a given tablet (for example, after bulk loads or for maintenance).

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] flush_vector_index <tablet-id> [<vector-index-id1> <vector-index-id2> ...]
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- *tablet-id*: The identifier of the tablet that contains the vector index(es).
- *vector-index-id1*, *vector-index-id2*, ...: Optional. Table IDs of specific vector indexes to flush. If omitted, all vector indexes on the tablet are flushed.

### is\_server\_ready

Prints the number of tablets that have not yet bootstrapped. If all tablets have bootstrapped, returns "Tablet server is ready".

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] is_server_ready
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.

### list\_tablets

Lists the tablets on the specified tablet server, displaying the following properties: column name, tablet ID, state, table name, shard, and schema.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] list_tablets
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.

### refresh\_flags

Refresh flags that are loaded from the configuration file. Works on both YB-Master (port 9100) and YB-TServer (port 7100) process. No parameters needed.

Each process needs to have the following command issued, for example, issuing the command on one YB-TServer won't update the flags on the other YB-TServers.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] refresh_flags
```

- *host*:*port*: The *host* and *port* of the YB-Master or YB-TServer. Default is `localhost:9100`.

### reload\_certificates

Trigger a reload of TLS certificates and private keys from disk on the specified (master or tablet) server.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] reload_certificates
```

- *host*:*port*: The *host* and *port* of the master or tablet server. Default is `localhost:9100`.

### remote\_bootstrap

Trigger a remote bootstrap of a tablet from another tablet server to the specified tablet server.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] remote_bootstrap <source-host> <tablet-id>
```

- *host*:*port*: The *host* and *port* of the tablet server running the remote bootstrap. Default is `localhost:9100`.
- *source-host*: The *host* or *host* and *port* of the tablet server to bootstrap from.
- *tablet-id*: The identifier of the tablet to trigger a remote bootstrap for.

See [Manual remote bootstrap of failed peer](/stable/troubleshoot/cluster/replace_failed_peers/ "Manual remote bootstrap of failed peer") for example usage.

### set\_flag

Sets the specified configuration flag for the tablet server.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] set_flag [ --force ] <flag> <value>
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.
- `--force`: Flag to allow a change to a flag that is not explicitly marked as runtime-settable. Note that the change may be ignored on the server or may cause the server to crash, if unsafe values are provided. See [--force](#force "--force").
- *flag*: The yb-tserver configuration flag (without the `--` prefix) to be set. See [yb-tserver](/stable/reference/configuration/yb-tserver/ "yb-tserver")
- *value*: The value to be applied.

Important

The `set_flag` command changes the in-memory value of the specified flag, atomically, for a running server, and can alter its behavior. **The change does NOT persist across restarts.**

In practice, there are some flags that are runtime safe to change (runtime-settable) and some that are not. For example, the bind address of the server cannot be changed at runtime, because the server binds just once at startup. While most of the flags are probably runtime-settable, you need to review the flags and note in the configuration pages which flags are not runtime-settable. (See GitHub issue [#3534](https://github.com/yugabyte/yugabyte-db/issues/3534 "#3534")).

One typical operational flow is that you can use this to modify runtime flags in memory and then out of band also modify the configuration file that the server uses to start. This allows for flags to be changed on running servers, without executing a restart of the server.

### status

Prints the status of the tablet server, including information on the node instance, bound RPC addresses, bound HTTP addresses, and version information.

**Syntax**

```sh
yb-ts-cli [ --server_address=<host>:<port> ] status
```

- *host*:*port*: The *host* and *port* of the tablet server. Default is `localhost:9100`.

For an example, see [Return the status of a tablet server](#return-the-status-of-a-tablet-server "Return the status of a tablet server")

## Flags

The following flags can be used, when specified, with the commands above.

### --exclude\_vector\_indexes

Use with [compact\_tablet](#compact_tablet "compact_tablet") or [compact\_all\_tablets](#compact_all_tablets "compact_all_tablets") to compact only the tablet's RocksDB data and skip vector indexes on the tablet. Not valid for flush commands.

Default: `false` (vector indexes are included in compaction)

### --force

Use this flag with the [`set_flag`](#set-flag "set_flag") command to allow a change to a flag that is not explicitly marked as runtime-settable. Note that the change may be ignored on the server or may cause the server to crash, if unsafe values are provided.

Default: `false`

### --server-address

The address (*host* and *port*) of the tablet server to run against.

Default: `localhost:9100`

### --timeout\_ms

The duration, in milliseconds (ms), before the RPC request times out.

Default: `60000` (1000 ms = 1 sec)

### --certs\_dir\_name

To connect to a cluster with TLS enabled, you must include the `--certs_dir_name` flag with the directory location where the root certificate is located.

Default: `""`

## Examples

### Return the status of a tablet server

```sh
./bin/yb-ts-cli --server_address=127.0.0.1 --certs_dir_name="/path/to/dir/name" status
```

```output
node_instance {
  permanent_uuid: "237678d61086489991080bdfc68a28db"
  instance_seqno: 1579278624770505
}
bound_rpc_addresses {
  host: "127.0.0.1"
  port: 9100
}
bound_http_addresses {
  host: "127.0.0.1"
  port: 9000
}
version_info {
  git_hash: "83610e77c7659c7587bc0c8aea76db47ff8e2df1"
  build_hostname: "yb-macmini-6.dev.yugabyte.com"
  build_timestamp: "06 Jan 2020 17:47:22 PST"
  build_username: "jenkins"
  build_clean_repo: true
  build_id: "743"
  build_type: "RELEASE"
  version_number: "2.0.10.0"
  build_number: "4"
}
```

### Display the current hybrid time

```sh
./bin/yb-ts-cli  --server_address=yb-tserver-1:9100 current_hybrid_time
```

```output
6470519323472437248
```
