cloud-cli is an interactive command-line tool for on-call troubleshooting of Apache Doris / SelectDB clusters. It provides a TUI menu that groups common FE/BE diagnostic workflows and writes collected artifacts into an output directory for easy archiving and sharing.
The tool is organized into two categories: FE and BE.
fe-list: List and select the FE target host (IP) for the current session based onclusters.toml.jmap(jmap-dump,jmap-histo): Java heap dump / histogram.jstack: Java thread dump.fe-profiler: Generate a flame graph using Dorisbin/profile_fe.sh(requires async-profiler).table-info: Interactive database/table browser that collects and summarizes schema, indexes, partitions, and bucket details (supports exporting.txtreports).routine-load: Routine Load helper tools:Get Job ID: List and select a Routine Load job (cached locally for later analysis).Performance Analysis: Analyze per-commit rows/bytes/time from FE logs.Traffic Monitor: Aggregate per-minuteloadedRowsfrom FE logs.
fe-audit-topsql: Parsefe.audit.log, normalize SQL into templates, and aggregate by CPU/time to generate a TopSQL report. Default filter iscount > 10; if nothing matches, it falls back to showing results without the count filter.
be-list: List and select the BE target host (IP) for the current session based onclusters.toml(defaults to127.0.0.1).pstack: Usegdbto dump process thread stacks (writes a.txtfile).jmap(jmap-dump,jmap-histo): Java heap dump / histogram (only meaningful for JVM processes).be-config:get-vars(get-be-vars): Query BE configuration variables via HTTP/varz.update-config(set-be-config): Update configuration via HTTP/api/update_config(supports persist).
pipeline-tasks: Fetch running pipeline tasks via HTTP/api/running_pipeline_tasks(auto-saves when the response is large).memz:current(memz): Fetch the current Jemalloc memory view via HTTP/memz(saves HTML and prints a summary).global(memz-global): Fetch the global memory view via HTTP/memz?type=global.
cargo build --release
./target/release/cloud-cli- Persistent config:
~/.config/cloud-cli/config.toml - MySQL key file:
~/.config/cloud-cli/key - Cluster topology cache:
~/.config/cloud-cli/clusters.toml - First run: if an FE process is detected and MySQL credentials are missing, it will prompt you to configure and test the connection. On success, it writes
config.tomland fetches cluster topology intoclusters.toml(used byfe-list/be-list). - Common environment variables (override persistent config):
JDK_PATH: Set the JDK path (used byjmap/jstack).OUTPUT_DIR: Set the output directory (default:/tmp/doris/collection).CLOUD_CLI_TIMEOUT: External command timeout in seconds (default:60).CLOUD_CLI_NO_PROGRESS: Disable progress animation (1/true).MYSQL_HOST/MYSQL_PORT: Set Doris MySQL endpoint (defaults are derived from config; otherwise127.0.0.1:9030).PROFILE_SECONDS: Overridefe-profilercollection duration in seconds.CLOUD_CLI_FE_AUDIT_TOPSQL_INPUT: Provide an explicitfe.audit.logpath forfe-audit-topsql(skips interactive selection).
- Most tools write artifacts into the output directory (default:
/tmp/doris/collection) and printOutput saved to: .... - A few tools primarily print to stdout (e.g.,
get-be-vars), but still follow consistent prompts and error messages.
The CLI invokes some system commands at runtime. Ensure these are installed and available in PATH:
mysql(for cluster info, Routine Load, Table Info, etc.)curl(for BE HTTP tools)gdb(forpstack)bash
This project uses GitHub Actions to build and publish Linux (x86_64 / aarch64) binaries. When you create a tag (e.g., v1.0.0), a corresponding GitHub Release is produced.
You can download the latest prebuilt binaries from GitHub Releases: https://github.com/QuakeWang/cloud-cli/releases