Sys.cpuinfo(sfsmisc)
Sys.cpuinfo()所属R语言包:sfsmisc
Provide Information about the Linux Hardware (CPU, Memory, etc)
提供信息的Linux硬件(CPU,内存等)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Return information about the Linux hardware, notably the CPU (the central processor unit) and memory of the computer R is running on. This is currently only available for Linux.
返回Linux的硬件,特别是CPU(中央处理单元)和内存中的R是在计算机上运行的信息。这是目前唯一可用于Linux。
These functions exist on other unix-alike platforms, but produce an error when called.
这些功能上存在其他的Unix相似的平台,但调用时产生错误。
用法----------Usage----------
Sys.procinfo(procfile)
Sys.cpuinfo()
Sys.meminfo()
Sys.MIPS()
参数----------Arguments----------
参数:procfile
name of file the lines of which give the CPU info “as on Linux”
的文件名,行,在Linux上的CPU信息“”
值----------Value----------
The Sys.*info() functions return a "simple.list", here basically a named character vector, (where the names have been filtered through make.names(*, unique=TRUE) which is of importance for multi-processor or multi-core CPUs, such that vector can easily be indexed.
Sys.*info()函数返回一个"simple.list",这里基本上是一个命名的字符向量,(如名称已被过滤make.names(*, unique=TRUE)多处理器或多核心处理器的重要性,这是向量可以很容易地被编入索引。
Sys.MIPS returns 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"].
Sys.MIPS返回一个数字给出一个近似的万Iinstructions每秒CPU处理。这是一个基本的非数字处理能力和性能指标的Linux系统中经常两倍左右的基本时钟率“兆赫”为可供Sys.cpuinfo()["cpu MHz"]。
注意----------Note----------
These currently do rely on the Linux "/proc/" file system, and may not easily be portable to non-Linux environments.
目前这些做依靠Linux的/proc/的文件系统,并且可以很容易被移植到非Linux环境。
On multi-processor machines, Sys.cpuinfo() contains each field for each processor (i.e., names(Sys.cpuinfo()) has duplicated entries).
在多处理器机器上,Sys.cpuinfo()包含每个字段的每个处理器(即names(Sys.cpuinfo())duplicated项)。
Conceivably, the bogoMIPS source code is open and available and could be built into R.
可以想象,bogoMIPS的源代码是开放的,可以建到R.
(作者)----------Author(s)----------
Martin Maechler
参见----------See Also----------
Sys.ps, etc.
Sys.ps,等等。
实例----------Examples----------
if(substr(R.version[["os"]], 1,5) == "linux") { ##-- only on Linux[ - 仅在Linux]
Sys.cpuinfo() # which is often ugly[这往往是丑陋的]
local({I <- Sys.cpuinfo(); I[ "flags" != names(I) ] })
Sys.MIPS()
Sys.MIPS() / as.numeric(Sys.cpuinfo()["cpu MHz"]) ## < often about 2[#通常约2]
}
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|