3

I want to print some hardware info in my R session. I can achieve this by using the system() function, which in my Linux machine looks like this:

> system("lscpu | grep 'Model name:'")
Model name:          Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
> system("lsmem | grep 'Total online memory'")
Total online memory:      16G

I know R has functions like Sys.info() to provide this kind of data, but I couldn't find such a function that allows one to print CPU and RAM info.

I would really like to find one such function, as relying on system() is OS-dependent.

Waldir Leoncio
  • 10,853
  • 19
  • 77
  • 107

1 Answers1

7

The benchmarkme package has a couple of functions you may find useful, like get_cpu() and get_ram().

koenniem
  • 506
  • 2
  • 10