get_total_ram

get_total_ram

SYSTEM_UTILS

1 Description

Returns the total physical RAM installed in the system.

2 Usage

get_total_ram()

3 Value

Numeric value with total RAM in gigabytes (GB)

4 Details

This function queries the operating system to determine total RAM. Works on Windows, Linux, and macOS.

The value returned is the physical RAM available to the system: - On physical machines: actual installed RAM - On virtual machines: RAM allocated to the VM - On containers: RAM limit set for the container

5 Examples

\donttest{
# Check total RAM
total <- get_total_ram()
cat("System has", total, "GB of RAM\n")

# Returns 16.0 on a 16GB system
}

6 See Also