docs/content/v2025.1/admin/yb-ts-cli.md
yb-ts-cli is a command line tool that can be used to perform an operation on a particular tablet server (yb-tserver). Some of the commands perform operations similar to 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.
yb-ts-cli [ --server_address=<host>:<port> ] <command> <flags>
localhost:9100.To display the available online help, run yb-ts-cli without any commands or flags at the YugabyteDB home directory.
./bin/yb-ts-cli
If all tablets are running, returns "All tablets are running".
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] are_tablets_running
localhost:9100.Prints the number of tablets that have not yet bootstrapped. If all tablets have bootstrapped, returns "Tablet server is ready".
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] is_server_ready
localhost:9100.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
yb-ts-cli [ --server_address=<host>:<port> ] clear_server_metacache
localhost:9100.Compact all tablets on the tablet server.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] compact_all_tablets
localhost:9100.Compact the specified tablet on the tablet server.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] compact_tablet <tablet-id>
localhost:9100.Print the count of uncommitted intents (or provisional records). Helpful for debugging transactional workloads.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] count_intents
localhost:9100.Prints the value of the current hybrid time.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] current_hybrid_time
localhost:9100.Deletes the tablet with the specified tablet ID (tablet-id) and reason.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] delete_tablet <tablet-id> "<reason-string>"
localhost:9100.Dump, or export, the specified tablet ID (tablet-id).
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] dump_tablet <tablet-id>
localhost:9100.Flush all tablets on the tablet server.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] flush_all_tablets
localhost:9100.Flush the specified tablet on the tablet server.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] flush_tablet <tablet-id>
localhost:9100.Lists the tablets on the specified tablet server, displaying the following properties: column name, tablet ID, state, table name, shard, and schema.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] list_tablets
localhost:9100.Trigger a reload of TLS certificates and private keys from disk on the specified (master or tablet) server.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] reload_certificates
localhost:9100.Trigger a remote bootstrap of a tablet from another tablet server to the specified tablet server.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] remote_bootstrap <source-host> <tablet-id>
localhost:9100.See Manual remote bootstrap of failed peer for example usage.
Sets the specified configuration flag for the tablet server.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] set_flag [ --force ] <flag> <value>
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.-- prefix) to be set. See yb-tserver{{< note title="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).
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.
{{< /note >}}
Prints the status of the tablet server, including information on the node instance, bound RPC addresses, bound HTTP addresses, and version information.
Syntax
yb-ts-cli [ --server_address=<host>:<port> ] status
localhost:9100.For an example, see Return the status of a tablet server
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
yb-ts-cli [ --server_address=<host>:<port> ] refresh_flags
localhost:9100.The following flags can be used, when specified, with the commands above.
Use this flag with the 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
The address (host and port) of the tablet server to run against.
Default: localhost:9100
The duration, in milliseconds (ms), before the RPC request times out.
Default: 60000 (1000 ms = 1 sec)
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: ""
./bin/yb-ts-cli --server_address=127.0.0.1 --certs_dir_name="/path/to/dir/name" status
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"
}
./bin/yb-ts-cli --server_address=yb-tserver-1:9100 current_hybrid_time
6470519323472437248