
Host CPU and RAM identification (cross-platform)
host_cpu_info.RdIdentifies the CPU model, logical core count, and total RAM of the machine
running the current R process. Each field falls back to NA if it can't be
determined.
Details
Implementation by platform:
Linux: reads
/proc/cpuinfo(model name) and/proc/meminfo(MemTotal).macOS (
Darwin):sysctl -n machdep.cpu.brand_stringfor the CPU model,sysctl -n hw.memsizefor RAM.Windows:
PROCESSOR_IDENTIFIERenvironment variable for the CPU model,wmic ComputerSystem get TotalPhysicalMemoryfor RAM.Logical core count uses
parallel::detectCores()on every platform.
Used by landis_run_docker() and landis_run_local() to append host
context to each rep's resource log so downstream provenance tooling can
identify what host produced any given replicate's outputs.