Script for Audits stat by satellites

The script for audits from logs doesn’t working anymore.
Better to request your storagenode API instead:

Docker version (bash)

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

Docker version (Powershell)

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

Dashboard is port mapped (bash)

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

Dashboard is port mapped or Windows GUI (Powershell)

((curl http://127.0.0.1:14002/api/dashboard).Content | ConvertFrom-Json).data.satellites.id | %{"$_"; ((curl http://127.0.0.1:14002/api/satellite/$_).Content | ConvertFrom-Json).data.audit}
4 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