Sys.cpuinfo {sfsmisc} | R Documentation |
Return information about the CPU, the central processor unit of the computer R is running on. This is currently only available for Linux.
Sys.cpuinfo(procfile = "/proc/cpuinfo") Sys.MIPS()
procfile |
name of file the lines of which give the CPU info ``as on Linux'' |
Sys.cpuinfo()
returns a named character vector, Sys.MIPS
a number giving an approximation of the Million
Iinstructions Per Second that the CPU
processes. This is a performance measure of the basic
non-numeric processing capabilities and for Linux systems often
about twice the basic clock rate in ``MHz'' as available by
Sys.cpuinfo()["cpu MHz"]
.
These currently do rely on cat /proc/cpuinfo
, and may not
easily be portable to non-Linux environments.
Conceivably, the bogoMIPS source code is open and available and could be built into R.
Martin Maechler
Sys.ps
, etc.
if(substr(R.version[["os"]], 1,5) == "linux") { ##-- only on Linux cbind(Sys.cpuinfo()) Sys.MIPS() Sys.MIPS() / as.numeric(Sys.cpuinfo()["cpu MHz"]) ## < often about 2 }