本页面使用机器翻译自英语,可能包含错误或不清楚的语言。如需最准确的信息,请参阅英文原文。由于更新频繁,部分内容可能与英文原文有出入。请加入我们在 Crowdin 上的努力,帮助我们改进本页面的翻译。 (Crowdin translation page, Contributing guide)
Analytics tool
This guide explains how to setup analytics tool to collect the diagnostics data.
1. Prepare the analytics tool
Download the next script:
curl -O https://raw.githubusercontent.com/kaiachain/kaiaspray/main/analyze.sh
Make it executable:
chmod +x analyze.sh
Set the next paths to yours:
LOG_DIR="/var/kcnd/data/logs"BIN_PATH="/usr/bin/kcn"IPC_URL="/var/kcnd/data/klay.ipc"RPC_URL="http://localhost:8551"
2. Basic Usage
Run complete analysis:
# NOTE: monitor should be enabled./analyze.sh --days 5 --log-dir $LOG_DIR --monitor-port 61001
To collect only gov-data (collect via rpc):
./analyze.sh --gov-data-only --bin-path $BIN_PATH --rpc-endpoint $RPC_URL --block-height 5
To collect only consensus-data (collect via ipc):
# NOTE: If you're querying on a full node, only (multiples of 1024 + 1 or recent) block nums are available. ./analyze.sh --consensus-only --rpc-endpoint $IPC_URL --bin-path $BIN_PATH --block-height 1025
To collect only network-data (collect via ipc):
./analyze.sh --network-only --rpc-endpoint $IPC_URL --bin-path $BIN_PATH