Skip to content
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

[BUG] Wrong Used Memory Detection on WSL2 #1096

Closed
Yikai-Liao opened this issue Jul 15, 2024 · 4 comments
Closed

[BUG] Wrong Used Memory Detection on WSL2 #1096

Yikai-Liao opened this issue Jul 15, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Yikai-Liao
Copy link

I'm using debian12 on wls2, ans fastfetch tends to show a higher used memory than neofetch.

截图_20240715151105

I have further checked the used memory shown in gotop, htop and btm, and they tend to agree with neofetch.

I haven't check if it could be reproduced on a physical machine.

@Yikai-Liao Yikai-Liao added the bug Something isn't working label Jul 15, 2024
@CarterLi
Copy link
Member

neofetch is wrong.

Fastfetch uses MemAvailable, which is calcuated directly by kernel.

Neofetch also uses this property. However the change introduced MemAvailable (Nov 3, 2020) in neofetch was committed after the latest release was cut (Aug 3, 2020).

You can try the latest neofetch source and it will print similar values as fastfetch.

You can also try free -h too.

@Yikai-Liao
Copy link
Author

Yikai-Liao commented Jul 15, 2024

free -h and top do show the same result. So it means btm, gotop, htop all show the wrong result? It's the first time I notice that top would show different memory usage compared to those "more beautiful" tools.

@Yikai-Liao
Copy link
Author

It seems that they get different definitions about used memory according to https://www.reddit.com/r/linuxquestions/comments/1bicj9b/why_htop_shows_less_memory_than_system_monitor/

@CarterLi
Copy link
Member

It seems that they get different definitions about used memory

Yeah.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants