fix RAM calculation on macOS in system-info (#13260)
Ilya Mashchenko committed
Jun 30, 2022 at 11:08 UTC
7be66eebb1ba6ec30a82d6998d2f2fc107a8d230
1 file changed
+1
-1
daemon/system-info.sh
+1
-1
@@ -338,7 +338,7 @@ if [ "${KERNEL_NAME}" = FreeBSD ]; then
338
TOTAL_RAM="$(sysctl -n hw.physmem)"
339
elif [ "${KERNEL_NAME}" = Darwin ]; then
340
RAM_DETECTION="sysctl"
341
- TOTAL_RAM="$(sysctl -n hw.physmem)"
341
+ TOTAL_RAM="$(sysctl -n hw.memsize)"
342
elif [ -r /proc/meminfo ]; then
343
RAM_DETECTION="procfs"
344
TOTAL_RAM="$(grep -F MemTotal /proc/meminfo | cut -f 2 -d ':' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | cut -f 1 -d ' ')"