-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot show the CPU usages of the processes #135
Comments
The content of ~/.local/state/gotop/errors.log 00:04:54 cpu.go:102: error: number of CPU usage percents from gopsutil doesn't match CPU count. percents: [7.000000000061846 6.999999999608917 1.0101010100866268 9.99999999994543]. self.Count: 0 |
@Tigerfyj , a Raspberry, huh? What's the architecture on that? Can you please provide the output for:
That last command varies by distribution, but if you can find an |
$ uname -m
armv7l
$ ps -axo pid:10,comm:50,pcpu:5,pmem:5 | head -n 5
PID COMMAND %CPU %MEM
1 systemd 0.0 0.5
2 kthreadd 0.0 0.0
3 rcu_gp 0.0 0.0
4 rcu_par_gp 0.0 0.0
$ sudo find /etc -name '*lsb*'
(empty) |
I use 'arm6' version of the binary. I just tried the version 3.5.0 and it works well. |
That's interesting and useful to know, thank you. |
@Tigerfyj everything looks OK, so can you provide a little more information? If you run:
the very last line points to the log file. It may not be the same as the Thanks! |
I downloaded v4.0.1 again and run it multiple times today. But, the errors.log is empty now. $ gotop -V The log file is in /home/pi/.cache/gotop/errors.log |
Oh, the previous error messages is in the file: ~/.local/state/gotop/errors.log. $ cat /home/pi/.local/state/gotop/errors.log |
I also run "go get" to build a version on my raspberry pi. The result is same. $ git rev-parse HEAD |
@Tigerfyj , can you try this binary please? It adds some logging to the proc widget -- it should dump a lot of stuff to the log; I only need a sample. |
The binary is 64-bit executable, but Raspberry Pi OS
<https://www.raspberrypi.org/downloads/raspberry-pi-os/> is a 32-bit
version.
Thanks & Best Regards
Tiger Feng
xxxserxxx <[email protected]> 于2020年6月23日周二 下午8:32写道:
… @Tigerfyj <https://github.com/Tigerfyj> , can you try this binary please?
It adds some logging to the proc widget -- it should dump a *lot* of
stuff to the log; I only need a sample.
gotop.zip <https://github.com/xxxserxxx/gotop/files/4819343/gotop.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4GAMWUWXTOSRJ2IPWV3P3RYCOGPANCNFSM4N2PUWYQ>
.
|
The attachment is the error.log file.
Thanks & Best Regards
Tiger Feng
xxxserxxx <[email protected]> 于2020年6月24日周三 上午4:01写道:
… @Tigerfyj <https://github.com/Tigerfyj> I'm not familiar with Raspberry,
or the ARM options. I thought armv71 was arm64, but I see you said you use
the arm6 executable -- I missed that. Try this binary.
gotop.zip <https://github.com/xxxserxxx/gotop/files/4821647/gotop.zip>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4GAMUVJJU6B63OSI37XC3RYEC3BANCNFSM4N2PUWYQ>
.
|
@Tigerfyj , I don't see an attachment -- did github add it correctly? |
It's an email attachment. Let me add the file in this email again.
errors.log.zip
(6 K)
<https://mail.google.com/mail/u/0?ui=2&ik=11fdee1194&attid=0.1&permmsgid=msg-a:r7308347399549563490&view=att&disp=safe&realattid=f_kbu6v1an0>
Thanks & Best Regards
Tiger Feng
xxxserxxx <[email protected]> 于2020年6月25日周四 上午6:31写道:
… @Tigerfyj <https://github.com/Tigerfyj> , I don't see an attachment --
did github add it correctly?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#135 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA4GAMWVGJ5M7A7IBJ4HMELRYJ5FJANCNFSM4N2PUWYQ>
.
|
Oh, I didn't realize that is auto-generated email. Upload the log file here. |
I tried to add some logs today. I can confirm the reason is the |
It looks like there are some issues with Does this issue look similar? In particular, what are the outputs of
I'd like to gather as much information as possible about this so I can add it to shirou/gopsutil#849. Edit@Tigerfyj, could you also run this bit of code, please? Just stick in the
I'm expecting to see some non-0 number for true, and 0 for false. Thanks. (Edit 2, fixed syntax) |
Here is the output.
|
@Tigerfyj are you able to build from branch v4.0.2 and test the changes I just committed? I think the percentages are not entirely accurate, but this isn't specific to ARM and there's another ticket about it. However, try this and see if you at least get some numbers. If so, then we'll close this and when I find the issue leading to the CPU usage discrepancies I'll make sure it works for ARM as well. |
Thanks! The v4.0.2 shows the cpu usages! |
@xxxserxxx FYI this is fixed with gopsutil current master (shirou/gopsutil#944), the fix is to be included in the next release at the end of the month. I could confirm it against an armv7 host. One can ensure this by running the cpu tests with |
Is this fix only available through the v4.0.2 branch currently? |
Hm. I merged it into master a while back, but it hasn't yet been released. Between a move and the holidays, I haven't had time to clean up and do a new release. Maybe before 2021? Maybe? |
Hehe, no problem, just wanted to know if I missed something, thanks for the answer!
Am 10.12.2020 08:02 schrieb xxxserxxx:
…Hm. I merged it into master a while back, but it hasn't yet been released. Between a move and the holidays, I haven't had time to clean up and do a new release. Maybe before 2021? Maybe?
--
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#135 (comment)
|
Works on my Pi4 as well! Thanks for your effort! |
gotop version:
gotop v4.0.1 (20200609T145934)
OS/Arch:
4.19.118-v7+ GNU/Linux
Terminal emulator:
iTerm on Mac, ssh to Raspberry Pi.
Any relevant hardware info:
Raspberry Pi B3+, Raspberry Pi B4
tmux version:
tmux 2.8
In the process widget, all cpu usages are 'NaN' or '+Inf'. I also tried to run with sudo, the output was same. Attached a screenshot.
The text was updated successfully, but these errors were encountered: