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
Wrong Ram Info #17
Labels
Comments
That’s quite the error indeed. It should be relatively easy to debug
though, I’ll investigate it soon. It seems there is also an issue with
the length of the ramp.
…--
Lucien “Phundrak” Cartier-Tilet
<https://phundrak.com> (Français)
<https://phundrak.com/en> (English)
Sent from GNU/Emacs
|
I cannot reproduce this issue on my macOS VM. This might be due to my
VM being stiill under macOS Catalina (by the way, I just found a bug
related to version detection, I’ll work on that in the meantime).
Could you give me the output of the following two shell commands on
your machine?
$ sysctl hw.physmem
$ sysctl hw.usermem
As well as the output of the following Elisp code?
(message "%s" system-type)
…--
Lucien “Phundrak” Cartier-Tilet
<https://phundrak.com> (Français)
<https://phundrak.com/en> (English)
Sent from GNU/Emacs
|
$ sysctl hw.physmem
hw.physmem: 2147483648
$ sysctl hw.usermem
hw.usermem: -722436096
$ (message "%s" system-type)
darwin |
It seems like physmem and usermem got broken in Big Sur. A new
implementation of retrieving RAM info needs to be implemented for
macOS.
For the record, neofetch does it like so:
,----
| mem_total="$(($(sysctl -n hw.memsize) / 1024 / 1024))"
| mem_wired="$(vm_stat | awk '/ wired/ { print $4 }')"
| mem_active="$(vm_stat | awk '/ active/ { printf $3 }')"
| mem_compressed="$(vm_stat | awk '/ occupied/ { printf $5 }')"
| mem_compressed="${mem_compressed:-0}"
| mem_used="$(((${mem_wired//.} + ${mem_active//.} + ${mem_compressed//.}) * 4 / 1024))"
`----
This could be a starting point for a patch.
…--
Lucien “Phundrak” Cartier-Tilet
<https://phundrak.com> (Français)
<https://phundrak.com/en> (English)
Sent from GNU/Emacs
|
@gopar I pushed a fix on the branch https://github.com/Phundrak/eshell-info-banner.el/tree/fix/macos-ram-detection, could you test it and see if it works as intended? |
Perfect, it’s now merged in main!
…--
Lucien “Phundrak” Cartier-Tilet
<https://phundrak.com> (Français)
<https://phundrak.com/en> (English)
Sent from GNU/Emacs
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Not sure what info you need from me to properly debug this :)
Also, mac has 16 GB available
The text was updated successfully, but these errors were encountered: