Operating system information utilities (shell-based).
Provides shell-dependent system metadata queries: architecture, kernel
version, CPU count, memory, and root check. For pure OS detection
(type, hostname, distro, WSL, container) use Apero.OS directly.
All command execution is routed through Arrea.Command.execute/2
with validate: false.
Summary
Functions
Returns the CPU architecture of the current machine.
Returns the number of logical CPU cores available to the OS.
Returns a consolidated map of system information.
Returns the OS kernel version string, or "unknown" if unavailable.
Returns true if the current process is running as root / Administrator.
Returns the total system RAM in megabytes, or 0 if unavailable.
Types
Functions
@spec arch() :: arch()
Returns the CPU architecture of the current machine.
Possible values: :x86_64, :arm64, :arm, :i386, :unknown.
@spec cpu_count() :: pos_integer()
Returns the number of logical CPU cores available to the OS.
@spec info() :: map()
Returns a consolidated map of system information.
For pure-Elixir fields (type, hostname, distro) call Apero.OS
directly. Keys: :arch, :kernel_version, :cpu_count,
:total_memory_mb.
@spec kernel_version() :: binary()
Returns the OS kernel version string, or "unknown" if unavailable.
@spec root?() :: boolean()
Returns true if the current process is running as root / Administrator.
@spec total_memory_mb() :: non_neg_integer()
Returns the total system RAM in megabytes, or 0 if unavailable.