본문으로 건너뛰기
이 페이지는 영문에서 기계 번역되었으므로 오역이나 어색한 표현이 있을 수 있습니다. 따라서 정확한 정보는 영어 원문을 참조하시기 바랍니다. 또한 잦은 업데이트로 인해 일부 콘텐츠는 영문이 그대로 남아있을 수 있습니다. 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"

페이지를 개선해 주세요