Script for Audits stat by satellites

Updated for

Docker version (bash)

for sat in `docker exec -i storagenode wget -qO - localhost:14002/api/sno | jq .satellites[].id -r`; do docker exec -i storagenode wget -qO - localhost:14002/api/sno/satellite/$sat | jq .id,.audits; done

Docker version (Powershell)

(docker exec -i storagenode wget -qO - localhost:14002/api/sno | ConvertFrom-Json).satellites.id | %{"$_"; (docker exec -i storagenode wget -qO - localhost:14002/api/sno/satellite/$_ | ConvertFrom-Json).audits}

Dashboard is port mapped (bash)

for sat in `wget -qO - localhost:14002/api/sno | jq .satellites[].id -r`; do wget -qO - localhost:14002/api/sno/satellite/$sat | jq .id,.audits; done

Dashboard is port mapped or Windows GUI (Powershell)

((curl http://127.0.0.1:14002/api/sno).Content | ConvertFrom-Json).satellites.id | %{"$_"; ((curl http://127.0.0.1:14002/api/sno/satellite/$_).Content | ConvertFrom-Json).audits}
7 Likes

This works great! Just ran it on my Synology NAS.

How long does this typically take to generate results? I ran the script and itā€™s just displaying ā€œFetching satellite audits stat information. Please waitā€¦ā€ for about 10 minutes now.

Hello @dragonhogan,
Welcome to the forum!

It could take a long time, if you have a long log.
But which script you referring to?

@Alexey Sounds like they might be referring to: https://raw.githubusercontent.com/AlexeyALeonov/audits_satellites/master/audits_satellites.sh

@dragonhogan mine took about 5-10 minutes on a PI, whatā€™s your setup?

yes, thatā€™s the script I was referring to. I am also running on a pi set up. Itā€™s a RP4 with 4GB ram and a USB 3.0 connected 4TB HDD.

I guess one question I had on the script as Iā€™m not well versed in the linux commands/bash scripts/etc was am I supposed to have changed anything in the script text, because I didnā€™tā€¦

Iā€™m pretty ā€œwet behind the earsā€ when it comes to this kind of stuff. I was able to follow the various guides/instructions (so kudos to the folks that put all of those together!) to limp through the setup process. I was curious to see what kind of results my setup was getting with this script since Iā€™m seeing when I run the log command that on average I get an error between every 6-10 download/upload requests. Although, after looking at the ā€œcommon errorā€ post on this forum, it doesnā€™t look like they are major errors or too concerning. I have had my node up and running since 01Aug and data does seem to be flowing in and out. Last time I checked I was up to about 100GB of storage used and about 200GB of bandwidth used.

1 Like

@dragonhogan What is your Node ID? I can check if it has been paused

19gi5NrYF9k8eKmYRvwvNcZLRhSYP7zdrMWN8jTpEGbHPPyYpM

thanks I appreciate the help!

@dragonhogan I checked, itā€™s not paused. Can you post your logs just so we can be sure nothing is wrong with your node?

docker logs --tail 20 storagenode

@dragonhogan Your posts were removed by the system because they weā€™re too long, but I saw the post and your node is running completely fine, just slow traffic right now. So nothing to worry :slight_smile:

Alrighty, cool. Thanks again. Really appreciate your assistance on this one. Wish the forum had brave tipping, Iā€™d tip you a few BAT for your help.

1 Like

i ran this command now where to see the output ? i donā€™t have docker logs pointed to a file.

Open a shell. Donā€™t close it.
Run the script, it could work a long time (depends on average speed of your system and how long is your logs).

Hi guys,

Is it normal for the shell to return to the command line after it says ā€œFetching satelliteā€¦etcā€? Like, mine started going and then after a second it went back to command line.
Running Debian on an atom 4 core 1.8Ghz CPU somewhere in France (my home one in Australia seems to be too far from everyone to be of any use to the network lol)

With the latest update, most of the scripts do not work anymore and need to be updated, sounds like this one is one of them

Have you redirected the log to the file?
If so, then you should run the script with a full path to the log as an argument

1 Like

Can someone explain what this script actually does?

#n00b :wink:

Calculates successful and unsuccessful audits across storagenode log.

Today i have restarted my node for changing the storj-payout-address. Now the audits are resetedā€¦ My audits for the 4 satellites was round: 500, 50, 16, 400.

Now: 21, 6, 4, 24ā€¦

What is with the rest of successfully audits? Past restart i have the start from 0? 30 days online for nothing? Or is the cause the reset of the logs with the new start?

As I said, itā€™s taking an information from the logs of the storagenode, If you removed the container, all logs have been removed with it.
However, you can see the audits and ratio from the storagenode API:

1 Like