Hey, @Alexey
How do I use the success rate program that you developed?
I tried and I even gave permission to change the policy of Microsoft when running it then after a few seconds, there is nothing.
Please advise something!
Perhaps you use the Windows GUI version of storagenode.
Then you should run it with path to the log.
./success_rate.ps1 -Path "$env:ProgramFiles/Storj/Storage Node/storagenode.log"
I get the following error message
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell Install PowerShell on Windows, Linux, and macOS - PowerShell | Microsoft Learn
PS C:\Windows\system32> cd C:\Users\dhiwa\Downloads\storj_earnings-master\storj_earnings-master
PS C:\Users\dhiwa\Downloads\storj_earnings-master\storj_earnings-master> ls
Directory: C:\Users\dhiwa\Downloads\storj_earnings-master\storj_earnings-master
Mode LastWriteTime Length Name
-a---- 11/03/2020 18:11 12512 earnings.py
-a---- 11/03/2020 18:11 843 README.md
PS C:\Users\dhiwa\Downloads\storj_earnings-master\storj_earnings-master> ./success_rate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./success_rate.ps1 : The term ‘./success_rate.ps1’ is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
- ./success_rate.ps1 -Path "$env:ProgramFiles/Storj/Storage Node/storag …
-
+ CategoryInfo : ObjectNotFound: (./success_rate.ps1:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\dhiwa\Downloads\storj_earnings-master\storj_earnings-master>
Sorry I went into the wrong path, but still things won’t work.
Here is a screenshot.
``
PS C:\Users\dhiwa\Downloads\storj_earnings-master\storj_earnings-master> cd C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ls
Directory: C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master
Mode LastWriteTime Length Name
-a---- 11/03/2020 19:12 247 README.md
-a---- 11/03/2020 19:12 3251 successrate.ps1
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./success_rate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./success_rate.ps1 : The term ‘./success_rate.ps1’ is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:1 char:1
- ./success_rate.ps1 -Path "$env:ProgramFiles/Storj/Storage Node/storag …
-
+ CategoryInfo : ObjectNotFound: (./success_rate.ps1:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
``
When I try to directly open the file successrate using PowerShell. The Powershell shows for a second and disappears.
oh, sorry. The name of the script is successrate.ps1
, not the success_rate.ps1
./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
Still the result is same.
``
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./successrate.ps1 : File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 cannot be
loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storage …
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
``
I thought this might help
``
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> Get-ExecutionPolicy
Restricted
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine Undefined
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
``
- Open PowerShell as Administrator
- Execute:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
- Close the elevated Powershell
- Open a regular Powershell and try to run the script again
Nope that didn’t went well.
First I did as you said and ran the script in normal powershell after failing I tried it in administrator mode.
Here is a screenshot of it
``
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “N”): y
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./successrate.ps1 : File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 cannot be
loaded. The file C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 is not digitally
signed. You cannot run this script on the current system. For more information about running scripts and setting
execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storage …
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
``
``
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell Install PowerShell on Windows, Linux, and macOS - PowerShell | Microsoft Learn
PS C:\Users\dhiwa> cd C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./successrate.ps1 : File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 cannot be
loaded. The file C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 is not digitally
signed. You cannot run this script on the current system. For more information about running scripts and setting
execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storage …
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
``
@Alexey If my vetting period is over will I consume the data normally(100%)?
Then make it unrestricted (from the elevated Powershell):
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
The vetted node will not have a limit of 5%. The usage depends on customers, so I do not know, would it be used on 100% or not.
Still not working.
``
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “N”): y
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “N”): y
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./successrate.ps1 : File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 cannot be loaded. The file C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 is not digitally
signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storage …
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
And in normal PowerShell
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./successrate.ps1 : File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 cannot be
loaded. The file C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 is not digitally
signed. You cannot run this script on the current system. For more information about running scripts and setting
execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storage …
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
``
You should restart the Powershell to continue
Still the same result
``
PS C:\Users\dhiwa> cd C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./successrate.ps1 : File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 cannot be
loaded. The file C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 is not digitally
signed. You cannot run this script on the current system. For more information about running scripts and setting
execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storage …
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
``
Even after a restart after updating the Windows, it won’t run
``
PS C:\Users\dhiwa> cd C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ls
Directory: C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master
Mode LastWriteTime Length Name
-a---- 11/03/2020 19:12 247 README.md
-a---- 11/03/2020 19:12 3251 successrate.ps1
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storagenode.log”
./successrate.ps1 : File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 cannot be
loaded. The file C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1 is not digitally
signed. You cannot run this script on the current system. For more information about running scripts and setting
execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
- ./successrate.ps1 -Path “$env:ProgramFiles/Storj/Storage Node/storage …
-
+ CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
``
Ok. Then try this trick:
Unblock-File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1
To make a code block you need to use three backticks not two
what is meant by this?
Finally, It worked like a charm.
Thank You @Alexey
Here is a screen shot
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> Unblock-File C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master\successrate.ps1
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master> ./successrate.ps1 -Path "$env:ProgramFiles/Storj/Storage Node/storagenode.log"
========== AUDIT =============
Successful: 17
Recoverable failed: 0
Unrecoverable failed: 0
Success Min: 100%
Success Max: 100%
========== DOWNLOAD ==========
Successful: 877
Failed: 10
Success Rate: 98.8726042841037
========== UPLOAD ============
Successful: 13840
Rejected: 0
Failed: 72
Acceptance Rate: 100
Success Rate: 99.4824611845888
========== REPAIR DOWNLOAD ===
Successful: 0
Failed: 0
Success Rate: 0
========== REPAIR UPLOAD =====
Successful: 96
Failed: 0
Success Rate: 100
PS C:\Users\dhiwa\Downloads\success_rate-master\success_rate-master>
and
there should be three such characters: ```
at the beginning of code block and at the end.
I edited your previous post, now you can see how it’s made