From 3d0567b5c3c25f0ed7369e2b49130cb879ed5c5a Mon Sep 17 00:00:00 2001 From: MictoNode <94179917+MictoNode@users.noreply.github.com> Date: Sat, 7 Sep 2024 23:04:52 +0300 Subject: [PATCH] Update storage.md --- 0G-newton-T2/storage.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/0G-newton-T2/storage.md b/0G-newton-T2/storage.md index f6b5a7b..04d8654 100644 --- a/0G-newton-T2/storage.md +++ b/0G-newton-T2/storage.md @@ -198,3 +198,15 @@ tail -f ~/0g-storage-node/run/log/zgs.log.$(TZ=UTC date +%Y-%m-%d) | grep tx_seq ``` curl -X POST http://localhost:5678 -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"zgs_getStatus","params":[],"id":1}' | jq ``` +Süslü kontrol kodu (Height artıyorsa ve peers varsa tamamdır.) +``` +while true; do + response=$(curl -s -X POST http://localhost:5678 -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","method":"zgs_getStatus","params":[],"id":1}') + logSyncHeight=$(echo $response | jq '.result.logSyncHeight') + connectedPeers=$(echo $response | jq '.result.connectedPeers') + echo -e "logSyncHeight: \033[32m$logSyncHeight\033[0m, connectedPeers: \033[34m$connectedPeers\033[0m" + sleep 5; +done +``` + +