Closed S-Maciejewski closed 4 years ago
Hey @S-Maciejewski , It was raised previously at #30. It is because you need to give it administrative permissions in Windows to get it running.
You even might consider inspecting code in memory.go file line number 67 to 73
@saviourcode Unfortunately I still cannot make it work, even with elevated privileges. Shouldn't the condition in lines 69 to 73 eliminate the need for running this as admin btw?
Anyways, the error seems to occur in processes sorting. I wonder if there are any other processes running on my machine that should be excluded from the list. I will investigate this issue further, because for now it makes the whole program just crash on Windows
@S-Maciejewski The Error is because somehow, the sort.Slice
block got included twice in the source code, remove the lines from 53 through 65 and then do go build
and runas admin. It will work.
@S-Maciejewski Can you please raise the PR after doing those changes, thanks in advance 👍
For brevity, I used the --top5-ram
flag
but here's how it will produce ouptut. I am using Windows Terminal with Admin Access.
@saviourcode yes you are right, I found this issue few hours ago and am fixing this along the new refactor of code in a dev branch which will go public soon. This will be fixed there. Kudos for @S-Maciejewski to realise this and @saviourcode effectively figuring a solution!
@S-Maciejewski Thanks for making us aware of our silly mistake. If you can provide a better way to List those Top5 Processes with Memory Usage without elevated privileges, please raise a PR for it. We will highly appreciate it.
Describe the bug An error occurs when running termiboard on Windows, process finishes with exit code 2. The error:
To Reproduce Steps to reproduce the behavior:
Expected behavior Program should finish with exit code 0 and top processes should be displayed