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

Mac M1 reports 0 available memory since 0.29 #1030

Closed
tzemanovic opened this issue Jul 27, 2023 · 5 comments
Closed

Mac M1 reports 0 available memory since 0.29 #1030

tzemanovic opened this issue Jul 27, 2023 · 5 comments

Comments

@tzemanovic
Copy link

We upgraded to 0.29.4 in anoma/namada#1695 and we got some devs on M1 who are seeing 0 available memory. We checked using the example on few different versions, but there are unfortunately no release tags so we weren't able to check on 0.28. The last working version seems to be 0.27

@GuillaumeGomez
Copy link
Owner

The code was last updated a year ago when I switched from KB to bytes. Nothing else changed. So two possibilities:

  1. You are still manipulating like it's KB and maybe you have an overflow?
  2. There was a breaking change in macOS API and in this case, I'll need someone with a mac M1 to check what's wrong.

@tzemanovic
Copy link
Author

thanks for a quick response and for the crate in general! I also don't have M1 but I can confirm that it's definitely not 1. case as we're also seeing this from the cargo run --example simple

@GuillaumeGomez
Copy link
Owner

Ok, then let's hope someone with a mac M1 will come around...

@alexsnaps
Copy link

alexsnaps commented Aug 4, 2023

Running cargo run --example simple on my MBP M1... things look... fine?

Getting processes' information...
Done.
To get the commands' list, enter 'help'.
> memory
total memory:       34359738 KB
available memory:    6521782 KB
used memory:        21884370 KB
total swap:                0 KB
used swap:                 0 KB
> cpus
number of physical cores: 10
total CPU usage: 13.320921%
Cpu { name: "1", CPU usage: 41.68799, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "2", CPU usage: 41.00889, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "3", CPU usage: 17.277477, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "4", CPU usage: 11.867079, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "5", CPU usage: 6.9490128, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "6", CPU usage: 4.722705, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "7", CPU usage: 4.340384, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "8", CPU usage: 2.3776731, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "9", CPU usage: 1.6301825, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
Cpu { name: "10", CPU usage: 1.3478242, frequency: 3228, vendor ID: "Apple", brand: "Apple M1 Pro" }
>

This is running HEAD a1a87de on master
Am I missing something?

I just started using sysinfo v0.29.7 in Limitador and it works fine on my M1 as well...

@GuillaumeGomez
Copy link
Owner

Thanks for checking! Then it confirms that the issue doesn't come from sysinfo. Closing then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants