NTracking

system load 15 / CPU count scale of 0 to 4

nothing to fancy hopefully a way for all the hero’s running at loads of 300 on 2vcpu’s to see a red indicator :slight_smile:

it would in theory be a 10 min job to switch over if nodes are added with safe node manager the script will pick them up :slight_smile:

2 Likes

I’ll think about it - but won’t go for any action the next couple of days :grimacing: no time…

1 Like

Won’t work for me since I start my nodes without node-manager and as processes and not services

oh well

it should work with some tweaking I am also not using safe node manager.
only bit that would need removed from the script is the bit that gets the node id from the sudo systmctl status safe node x.

if any part of a influx line input is malformed it rejects the whole line and since you are not running as service that part will cause the entire node data line to be rejected.

is any of it working ?

was bored so started you a custom edit

download this version and update the base directory variable to where you keep your nodes and execute it and send me back the out put. it will take 5 min to complete due to timers in the script.
if the node folder are named anything other than safenode1 safenode2 etc let me know and ill change that as well.

I let the node create the folder in the ~/.local/share/safe/node directories with the name being the peerID

1 Like

ok its been a while since I ran things that way check if the node binary is in that folder named for the peer id or if they are all using the binary from the location safe up installs it in?

The binary I use is being used from the PATH, so its the one safeup installs. safenode-manager is using the binary in the downloads directory that is under the safe directory or the safe/node directory

1 Like

cool right try this and see what it outputs

bash <(curl -s https://raw.githubusercontent.com/safenetforum-community/NTracking/main/neo.sh)

$ bash <(curl -s https://raw.githubusercontent.com/safenetforum-community/NTracking/main/neo.sh)
Runtime error (func=(main), adr=3): Divide by zero
nodes,id=safenode001 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode002 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode003 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode004 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode005 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode006 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode007 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode008 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode009 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode010 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode011 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode012 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes,id=safenode013 status=FALSE,records=0i,connected_peers=0i,rewards=0,store_cost=0i,cpu=0i,mem=0i,puts=0i,gets=0i,version=“0.110.0”,networ_size=0i 1723076480000000000
nodes_totals rewards=0,nodes_running=0i,nodes_killed=13i 1723076480000000000
nodes_totals total_disk=3049i 1723076480000000000
nodes_coingecko,curency=gbp exchange_rate=0.317605,marketcap=10540637.221096972,earnings=0 1723076480000000000
nodes_coingecko,curency=usd exchange_rate=0.402986,marketcap=13371912.335664138,earnings=0 1723076480000000000
nodes_network size=i 1723076480000000000
nodes latency=4.212 1723076480000000000

1 Like

have you got bc installed ? sudo apt install bc

nope, will do it now

1 Like

Says it was already installed

1 Like

ok I can see its going down the else if as if it doesn’t see the node folders. cd into one of the node folders and send me the full path or a screen shot ?

I know the script is good as I started a single node not as service and its out put is like this

ubuntu@sor:~$ bash <(curl -s https://raw.githubusercontent.com/safenetforum-community/NTracking/main/neo.sh)
nodes,id=safenode001 status=TRUE,records=0i,connected_peers=5i,rewards=0,store_cost=0i,cpu=0i,mem=55i,puts=i,gets=0i,version="0.110.0",networ_size=69632i 1723076700000000000
nodes_totals rewards=0,nodes_running=1i,nodes_killed=0i 1723076700000000000
nodes_totals total_disk=1i 1723076700000000000
nodes_coingecko,curency=gbp exchange_rate=0.317605,marketcap=10540637.221096972,earnings=0  1723076700000000000
nodes_coingecko,curency=usd exchange_rate=0.402986,marketcap=13371912.335664138,earnings=0  1723076700000000000
nodes_network size=69632i 1723076700000000000
nodes latency=1.154 1723076700000000000

have you got the metrics enabled and metrics ports starting on 13001 ?

NO Never use ports that low. Too easy to conflict with other software that thinks it fine to use lower port numbers.

mysystem:$ cd ~/.local/share/safe/node/12D3KooWFh7zM5QLfSWgbUSrJBw9tosxuQ39t4uoudMmukf1bTB8
mysystem:~/.local/share/safe/node/12D3KooWFh7zM5QLfSWgbUSrJBw9tosxuQ39t4uoudMmukf1bTB8$ ls -l
total 164
-rw-rw-r-- 1 nodeuser nodeuser      1 Aug  8 00:28 forwarded_balance
-rw-rw-r-- 1 nodeuser nodeuser     13 Aug  7 23:56 historic_quoting_metrics
drwxrwxr-x 2 nodeuser nodeuser   4096 Aug  7 23:56 logs
drwxrwxr-x 2 nodeuser nodeuser 135168 Aug  8 00:03 record_store
-rw-rw-r-- 1 nodeuser nodeuser      7 Aug  7 23:56 safenode.pid
-rw------- 1 nodeuser nodeuser     32 Aug  7 23:56 secret-key
drwxrwxr-x 2 nodeuser nodeuser   4096 Aug  7 23:56 wallet
1 Like

ok cool we are narrowing in have you got metrics enabled and if so what port range are you using ?

for this machine it starts with 44001

give this another try

You are using the wrong metric for peers. You need the routing table peers not the connected peers as that is a wildly varying figure showing how many connections there are to random peers. The RT peers are the actual verified peers the node wants for connectivity

The records is the total records stored in the record store and NOT the active records used for calculating store cost. Also inactive records can be disposed if space is ever needed. I’d love @Shu to add, in addition to the records stored, the active records the node is responsible for and of course the figure used int eh store cost calculation.

$ bash <(curl -s https://raw.githubusercontent.com/safenetforum-community/NTracking/main/neo.sh)
nodes,id=safenode001 status=TRUE,records=1154i,connected_peers=480i,rewards=10,store_cost=10i,cpu=3i,mem=250i,puts=1216i,gets=6396i,version="0.110.0",networ_size=94208i 1723077880000000000
nodes,id=safenode002 status=TRUE,records=1560i,connected_peers=827i,rewards=0,store_cost=0i,cpu=7i,mem=258i,puts=1661i,gets=7310i,version="0.110.0",networ_size=57344i 1723077880000000000
nodes,id=safenode003 status=TRUE,records=1221i,connected_peers=547i,rewards=0,store_cost=0i,cpu=2i,mem=181i,puts=1256i,gets=5878i,version="0.110.0",networ_size=102400i 1723077880000000000
nodes,id=safenode004 status=TRUE,records=1466i,connected_peers=572i,rewards=0,store_cost=0i,cpu=3i,mem=212i,puts=1529i,gets=7885i,version="0.110.0",networ_size=28672i 1723077880000000000
nodes,id=safenode005 status=TRUE,records=1182i,connected_peers=173i,rewards=10,store_cost=10i,cpu=1i,mem=130i,puts=1291i,gets=7043i,version="0.110.0",networ_size=16384i 1723077880000000000
nodes,id=safenode006 status=TRUE,records=1493i,connected_peers=476i,rewards=10,store_cost=10i,cpu=2i,mem=171i,puts=1605i,gets=8955i,version="0.110.0",networ_size=47104i 1723077880000000000
nodes,id=safenode007 status=TRUE,records=1416i,connected_peers=168i,rewards=0,store_cost=0i,cpu=3i,mem=217i,puts=1454i,gets=10029i,version="0.110.0",networ_size=28672i 1723077880000000000
nodes,id=safenode008 status=TRUE,records=1255i,connected_peers=819i,rewards=0,store_cost=0i,cpu=13i,mem=256i,puts=1340i,gets=8254i,version="0.110.0",networ_size=37888i 1723077880000000000
nodes,id=safenode009 status=TRUE,records=1197i,connected_peers=442i,rewards=0,store_cost=0i,cpu=4i,mem=256i,puts=1233i,gets=6870i,version="0.110.0",networ_size=59392i 1723077880000000000
nodes,id=safenode010 status=TRUE,records=1303i,connected_peers=180i,rewards=0,store_cost=0i,cpu=2i,mem=135i,puts=1437i,gets=6840i,version="0.110.0",networ_size=86016i 1723077880000000000
nodes,id=safenode011 status=TRUE,records=1329i,connected_peers=776i,rewards=0,store_cost=0i,cpu=19i,mem=267i,puts=1460i,gets=8455i,version="0.110.0",networ_size=22528i 1723077880000000000
nodes,id=safenode012 status=TRUE,records=1483i,connected_peers=212i,rewards=0,store_cost=0i,cpu=2i,mem=160i,puts=1529i,gets=7594i,version="0.110.0",networ_size=88064i 1723077880000000000
nodes,id=safenode013 status=TRUE,records=1437i,connected_peers=645i,rewards=0,store_cost=0i,cpu=3i,mem=213i,puts=1487i,gets=7049i,version="0.110.0",networ_size=37888i 1723077880000000000
nodes_totals rewards=.0000000300,nodes_running=13i,nodes_killed=0i 1723077880000000000
nodes_totals total_disk=3180i 1723077880000000000
nodes_coingecko,curency=gbp exchange_rate=0.31676,marketcap=10530806.003025308,earnings=.0000000095  1723077880000000000
nodes_coingecko,curency=usd exchange_rate=0.401921,marketcap=13362033.922789466,earnings=.0000000120  1723077880000000000
nodes_network size=54350i 1723077880000000000
nodes latency=4.151 1723077880000000000
1 Like