Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
SJQFJCQSFCPRGWKVWZNKIFAWYP9TVCRKQLWDPIRKMBZFHSEM99GFIRCABEDNWCJXKNHPZHZMO9CSPNCWB; 18264498990; KEY_REUSE_OCT
IDCHJETTGTQOO9UCRQCEJQSKGHSPVQZCIPDQBZAXWMPOB9OADAGBRDPBFQXRTX9KAMLAJPJTMJTMGJCH9; 3999996; KEY_REUSE_OCT
YTKFWOAE9LUYUSQBRQRWHPFPAFHNAYRIDSYEDAWJOBBVJTPI9EHNIKXWUNAEEDCCASY9REODAIQRAIJYB; 857351; KEY_REUSE_OCT
9HFIIQTGHIABK9VQXCHTBK9XEDIBGW9ZNQRQAYCJI9URUACEQGDBASXTYCEWWEVHRMULZLASSYVXMZYF9; 30003000000; KEY_REUSE_OCT
BXCJKDZHAOKZL9GTBSUK9RQOERQGBPIKDBHVZYTUBOMPXUIJQWBBOIJCLNLXYCRUEOZENJNTHIRXRWCZW; 27000000000; KEY_REUSE_OCT
SCG9YESCXUHFBHLTJVNDMTPHIXQDO9SF9SCLPORTRIOSFNXDSYBKEKAZ9YIQBIFLJGAULPRYJFDCYQHWB; 1000; KEY_REUSE_OCT
ZCZTZKGMKVETRWIBIFFSVKGMOHGYFNJREDAECEUYDAAKCKUCQWAMFQHFFSNTOPDDDQATVNHPRTIC9BAXD; 1532326467; KEY_REUSE_OCT
OZDCNW9Q9INHFRZXEIF9VVLJKKGB9QVKFVKQMY9ELFCIQFQ9WBDEYALWOHUFUFQFBCZBFHYJSNJMDNSHC; 1; KEY_REUSE_OCT
EOLLXBRJJIHNQVVONKUXANCWODXLZOEOBPLOHXUYBKKIQDGDBTUUPMEQ9WPKNECCZBGO9ERAYFNLKTRZX; 999; KEY_REUSE_OCT
LKIIAJNMEXSSMZACTRZFZJNLXRYWVVFTAWPWKBH9SNUSKYRYHMBCNW9INYD9TOGKMTKLZ
#!/bin/bash
# Call this script as follows: watch -d -t ./monitor_iri.sh
node=$(curl http://localhost:14265 -X POST -H 'X-IOTA-API-Version: 1.4.1' 'Content-Type: application/json' -d '{"command": "getNodeInfo"}' 2>/dev/null)
neighbors=$(curl http://localhost:14265 -X POST -H 'X-IOTA-API-Version: 1.4.1' 'Content-Type: application/json' -d '{"command": "getNeighbors"}' 2>/dev/null)
echo $node | jq -r '["IRI","Latest","Solid","Tips"], ["--------------------------------------------------------------------------------"], ([.appVersion, .latestMilestoneIndex, .latestSolidSubtangleMilestoneIndex, .tips]) | @tsv'
echo ''
echo $neighbors | jq -r '["All","New","Sent","Invalid","Type","Address"], ["--------------------------------------------------------------------------------"], (.neighbors | .[] | [.numberOfAllTransactions, .numberOfNewTransactions, .numberOfSentTransactions, .numberOfInvalidTransactions, .connectionType, .address]) | @tsv'