本文へスキップ
このページは英語からの機械翻訳を使用しており、誤りや不明瞭な表現が含まれている可能性があります。最も正確な情報については、オリジナルの英語版をご覧ください。頻繁な更新のため、一部のコンテンツはオリジナルの英語になっている可能性があります。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

3. Export the output

The result is stored in output folder. You can compress the output directory to zip file.


./analyze.sh --compress-output

You can upload the compressed zip file to s3.


# NOTE: aws-cli should be installed
ZIP_FILE=
S3_BUCKET=
aws s3 cp "$ZIP_FILE" "s3://$S3_BUCKET/$ZIP_FILE"

ページを改善してください。