Script: Calculate Success Rates for Audit, Download, Upload, Repair

Hi!

I’m triying to use this script,and works perfectly in ubuntu but in raspbian the code gives wrong number error everytime I try to print and a decimal number shows.

¿any thoughts about this?

Perhaps this could help: https://github.com/ReneSmeekes/storj_success_rate#locale-error-fix

2 Likes

I really love the shell script. Thank you!

Statistics look fine, but should I care of these 2?
I miss some kind of impact explanation from the figures.

  1. accepted / failed: 22 (=99.702% success rate)
  2. download / failed: 50 (=99.025% success rate)

This is mean that your node is part of “cut of long tail”, i.e. loses the race for pieces to other nodes.

It’s impossible to be closest to every customer in the world.

1 Like

Thx. This also applies for “repair up-/download”, right?

Yes. It’s not applied to GET_AUDIT though for obvious reason.

hello @Alexey ,
i want to use this script but i cant find the file : storagenode.log
it doesn’t exist in the path or sub directories of my storjnode files

But i can execute in SSH the command :
sudo docker logs storagenode

and it give me result such as:
“Satellite ID”: “121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6”, “Action”: “PUT”, “Size”: 64000}
2022-05-11T12:34:24.209Z INFO piecestore upload started {“Process”: “storagenode”, “Piece ID”: “T626CGD4UI7HID5UDLHZ7UAJPIIAPPAOXZUOJFLY2G3YVTKZMEQA”, “Satellite ID”: “121RTSDpyNZVcEU84Ticf2L1ntiuUimbWgfATz21tuvgk3vzoA6”, “Action”: “PUT”, “Available Space”: 358347924352}
2022-05-11T12:34:24.448Z INFO piecestore upload started {“Process”: “storagenode”, “Piece ID”: “EUCGS22OBNHSNA4OY4KAANXPYHBKUCCA54O2KY5K3IGRMDIRRCBQ”, “Satellite ID”: “12EayRS2V1kEsWESU9QMRseFhdxYxKicsiFmxrsLZHeLUtdps3S”, “Action”: “PUT”, “Available Space”: 358347924352}
etc …

how to configure to have the log file in DATA ?

thank you for help :slight_smile:

You need to use sudo ./successrate.sh in the ssh session. Of course, this script should be there and have an execution bit set (sudo chmod +x ./successrate.sh).

@Alexey
i have to sepcify the path for the file STORAGENODE.LOG but this file doesn’t exist in my docker node.

so can’t execute and adapt this command :

docker run --rm --mount “type=bind,source=path to successrate.sh folder,target=/tools,readonly” --mount “type=bind,source=path to the log file folder,target=/data,readonly” bash /tools/successrate.sh /data/storagenode.log

path to the log file folder : can’t find it …

location Greece
from 28/04/22, connection 100/10, over poweline,

========== AUDIT =============
Critically failed: 0
Critical Fail Rate: 0,00%
Recoverable failed: 0
Recoverable Fail Rate: 0,00%
Successful: 5511
Success Rate: 100,00%
========== DOWNLOAD ==========
Failed: 778
Fail Rate: 0,32%
Canceled: 7887
Cancel Rate: 3,21%
Successful: 236825
Success Rate: 96,47%
========== UPLOAD ============
Rejected: 0
Acceptance Rate: 100,00%
---------- accepted ----------
Failed: 130
Fail Rate: 0,02%
Canceled: 4097
Cancel Rate: 0,65%
Successful: 621711
Success Rate: 99,32%
========== REPAIR DOWNLOAD ===
Failed: 2
Fail Rate: 0,00%
Canceled: 0
Cancel Rate: 0,00%
Successful: 208842
Success Rate: 100,00%
========== REPAIR UPLOAD =====
Failed: 0
Fail Rate: 0,00%
Canceled: 134
Cancel Rate: 0,07%
Successful: 192358
Success Rate: 99,93%
PS C:\Program Files\Storj\Storage Node>

16/04/22 - 28/04/22, connection 100/10 over problematic wifi connection

========== AUDIT =============
Critically failed: 0
Critical Fail Rate: 0,00%
Recoverable failed: 0
Recoverable Fail Rate: 0,00%
Successful: 5590
Success Rate: 100,00%
========== DOWNLOAD ==========
Failed: 254
Fail Rate: 0,12%
Canceled: 8012
Cancel Rate: 3,78%
Successful: 203962
Success Rate: 96,11%
========== UPLOAD ============
Rejected: 0
Acceptance Rate: 100,00%
---------- accepted ----------
Failed: 52
Fail Rate: 0,01%
Canceled: 2521
Cancel Rate: 0,48%
Successful: 519268
Success Rate: 99,51%
========== REPAIR DOWNLOAD ===
Failed: 2
Fail Rate: 0,00%
Canceled: 1
Cancel Rate: 0,00%
Successful: 229596
Success Rate: 100,00%
========== REPAIR UPLOAD =====
Failed: 1
Fail Rate: 0,00%
Canceled: 413
Cancel Rate: 0,20%
Successful: 206243
Success Rate: 99,80%
PS C:\Program Files\Storj\Storage Node>

@Alexey
Thanks a lot
SOLVE for me
I did sudo ./succesrate.sh with no argument &

tada :

The docker version did not produce storagenode.log by default. You need to configure a log redirection to the file to make it happen.

So, this is why I suggested to run this script directly from the ssh session - it will call docker logs storagenode under the hood. But since you did not configure the docker usage without sudo, you need to run this script with sudo, otherwise docker logs will fail with insufficient permission error.

If you want to run this script inside the docker container to parse logs, then these logs should be redirected to the file. But in this case you can run this script without using a container, because log will be available on your host.

thanks @Alexey . :index_pointing_at_the_viewer: are :muscle:
with this info : all is clear & functional.
:clap:
best regards

1 Like