Skip to content

docdb

Use the tihc collect docdb command to collect TOPSQL storaged in DocDB of TiDB cluster.

Quick Start

bash
# Collect TopSQL data for the last 5 minutes
tihc collect docdb --instance 127.0.0.1:10080 --storage topsql.json

# Collect data for a specific time range
tihc collect docdb \
    --instance 127.0.0.1:10080 \
    --start 1744195176 \
    --end 1744195476 \
    --storage custom_topsql.json

Main Options

OptionDescriptionDefault Value
--instance <INSTANCE>Instance address, format is ip:port127.0.0.1:10080
--ngurl <NGURL>NG Monitor address127.0.0.1:12020
--start <START>Start timestamp1744195176
--end <END>End timestamp1744195476
--window <WINDOW>Time window size2s
--top <TOP>Limit of returned results10000
--storage <STORAGE>Data storage file pathtopsql.json