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

get_ram not working on Windows 10 #25

Closed
xiaodaigh opened this issue Sep 4, 2019 · 12 comments
Closed

get_ram not working on Windows 10 #25

xiaodaigh opened this issue Sep 4, 2019 · 12 comments

Comments

@xiaodaigh
Copy link
Contributor

When I run get_ram it returns NA B.

Here is my sessionInfo()

R version 3.5.3 (2019-03-11)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17763)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

loaded via a namespace (and not attached):
[1] compiler_3.5.3 tools_3.5.3   
@csgillespie
Copy link
Owner

Could you run

system("wmic MemoryChip get Capacity", intern=TRUE)

and tell me what that returns?

@xiaodaigh
Copy link
Contributor Author

"Capacity \r" "17179869184 \r" "17179869184 \r" "17179869184 \r" "17179869184 \r" "\r"

@csgillespie
Copy link
Owner

Thanks. Do you 16Gb of RAM or 4 * 16GB?

@xiaodaigh
Copy link
Contributor Author

4 * 16G

@tylerburleigh
Copy link

I also get NA B and system("wmic MemoryChip get Capacity", intern=TRUE) returns [1] "Capacity \r" "4294967296 \r" "4294967296 \r" "\r". My machine has 8GB, so 2x4GB chips.

@xiaodaigh
Copy link
Contributor Author

this works for me

system('grep MemTotal /proc/meminfo', intern = TRUE)
l = strsplit(a, " ")[[1]]
l = as.numeric(l[length(l)-1])
ram_size = l/1024^2

In fact, I have used this in the disk.frame package.

@csgillespie
Copy link
Owner

@xiaodaigh Does that work under windows 7 and 10?

@xiaodaigh
Copy link
Contributor Author

Windows 10 but haven't tested on Windows 7.

@csgillespie
Copy link
Owner

Thanks everyone. I've added the method proposed by @xiaodaigh and used the previous method as a fallback.

@jonathonkuntz
Copy link

I am also having the same problem where Get_ram() produces “NA B”

I used your code:

system("wmic MemoryChip get Capacity", intern=TRUE)

With an output of:

"Capacity \r" "17179869184 \r" "17179869184 \r" “\r”

This checks out since I have two 16 gb chips.

@wiesehahn
Copy link

I run into the same problem under windows 10 with package version 1.0.7

@gxc251
Copy link

gxc251 commented May 26, 2021

Same here under Windows 10, package version 1.0.7, and R version 4.1.0
system("wmic MemoryChip get Capacity", intern=TRUE)
[1] "Capacity \r" "17179869184 \r" "17179869184 \r" "\r"
get_ram()
NA B

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

No branches or pull requests

6 participants