Skip to content

Commit

Permalink
Adding transaction count to stats
Browse files Browse the repository at this point in the history
  • Loading branch information
Crypto2099 committed Aug 23, 2020
1 parent 70063a4 commit d57466e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions liveview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ do
slotnum=$(grep -oP '(?<=cardano_node_ChainDB_metrics_slotNum_int )[0-9]+' <<< "${data}")
uptimens=$(grep -oP '(?<=cardano_node_metrics_upTime_ns )[0-9]+' <<< "${data}")
density=$(grep -oP '(?<=cardano_node_ChainDB_metrics_density_real )[0-9]+' <<< "${data}")
transactions=$(grep -oP '(?<=cardano_node_metrics_txsProcessedNum_int )[0-9]+' <<< "${data}")
kesperiod=$(grep -oP '(?<=cardano_node_Forge_metrics_currentKESPeriod_int )[0-9]+' <<< "${data}")
kesremain=$(grep -oP '(?<=cardano_node_Forge_metrics_remainingKESPeriods_int )[0-9]+' <<< "${data}")
isleader=$(grep -oP '(?<=cardano_node_metrics_Forge_node_is_leader_int )[0-9]+' <<< "${data}")
Expand All @@ -40,6 +41,7 @@ do
peers=$(printf "%14s" "$peers")
epoch=$(printf "%14s" "$epochnum / $blocknum")
slot=$(printf "%14s" "$slotnum")
txcount=$(printf "%14s" "$transactions")

if [[ isleader -lt 0 ]]; then
isleader=0
Expand Down Expand Up @@ -89,6 +91,8 @@ do
echo -e '+---------------------+----------------+'
echo -e "| Uptime | ${uptime} |"
echo -e '+---------------------+----------------+'
echo -e "| Transactions | ${txcount} |"
echo -e '+---------------------+----------------+'
if [[ $abouttolead -gt 0 ]]; then
kesperiod=$(printf "%14s" "$kesperiod")
kesremain=$(printf "%14s" "$kesremain")
Expand Down

0 comments on commit d57466e

Please sign in to comment.