Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ReneSmeekes/storj_success_rate
https://github.com/ReneSmeekes/storj_success_rate
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ReneSmeekes/storj_success_rate
- Owner: ReneSmeekes
- Created: 2019-07-13T18:35:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-22T12:34:57.000Z (almost 3 years ago)
- Last Synced: 2024-08-02T02:11:34.527Z (3 months ago)
- Language: Shell
- Size: 37.1 KB
- Stars: 50
- Watchers: 4
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-storj - Success Rate Tool - Script parsing the log and printing out success rate (Linux/OSX version) ([forum thread](https://forum.storj.io/t/success-rate-script-now-updated-for-new-delete-terminology-since-v1-29-3/5114)) (Clients with Storj support and integrations)
README
# Success Rate Tool
This script calculates success rates for audits, downloads, uploads and repair traffic on Linux systems.
Alexey built a similar [script for windows](https://github.com/AlexeyALeonov/success_rate) users.
## How to use it
If your operating system can run _bash shell scripts_ you can run the script directly. Otherwise you can run it with the official [_bash_ docker image](https://hub.docker.com/_/bash).
The script accepts one optional argument, which is:
- a) The name of the docker storage node docker container.
- b) The path to a storage node log file.When the argument isn't provided, then it defauls to option (a) using _storagenode_ as a container name.
### Examples running it directly
Passing a docker container name: `./successrate.sh storjv3`
Passing a log file: `./successrate.sh /data/storagenode.log`
### Examples running it through docker
Unfortunately, running it through a docker container you can only run it with option (b), passing a log file.
```
docker run --rm --mount "type=bind,source=<>,target=/tools,readonly" --mount "type=bind,source=<>,target=/data,readonly" bash /tools/successrate.sh /data/storagenode.log
```Remember to update the "<< path...>>" place holders in the above instruction to your correct local paths.
## Locale error fix
If you see errors like `./successrate.sh: line 68: printf: 99.8048: invalid number` try running the script with
```
LC_ALL=C ./successrate.sh
```Example output:
```
========== AUDIT ==============
Critically failed: 0
Critical Fail Rate: 0.000%
Recoverable failed: 0
Recoverable Fail Rate: 0.000%
Successful: 14
Success Rate: 100.000%
========== DOWNLOAD ===========
Failed: 0
Fail Rate: 0.000%
Canceled: 3
Cancel Rate: 1.000%
Successful: 297
Success Rate: 99.000%
========== UPLOAD =============
Rejected: 0
Acceptance Rate: 100.000%
---------- accepted -----------
Failed: 0
Fail Rate: 0.000%
Canceled: 553
Cancel Rate: 28.417%
Successful: 1393
Success Rate: 71.583%
========== REPAIR DOWNLOAD ====
Failed: 0
Fail Rate: 0.000%
Canceled: 0
Cancel Rate: 0.000%
Successful: 0
Success Rate: 0.000%
========== REPAIR UPLOAD ======
Failed: 0
Fail Rate: 0.000%
Canceled: 0
Cancel Rate: 0.000%
Successful: 2
Success Rate: 100.000%
========== DELETE =============
Failed: 0
Fail Rate: 0.000%
Successful: 145
Success Rate: 100.000%
```