
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.
See also
Other LANDIS-II execution helpers:
landis_archive_rep(),
landis_assert_version(),
landis_find(),
landis_find_docker(),
landis_pool_exec(),
landis_pool_restart_one(),
landis_pool_start(),
landis_pool_stop(),
landis_replicate(),
landis_run_docker(),
landis_run_local(),
landis_target_version(),
landis_version(),
read_landis_resource_logs(),
tar_landis(),
validate_landis_scenario(),
write_landis_scenario_file()