diff options
author | Ilya Mashchenko <ilya@netdata.cloud> | 2022-06-30 11:08:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 11:08:19 +0300 |
commit | 7be66eebb1ba6ec30a82d6998d2f2fc107a8d230 (patch) | |
tree | 944feb3dab471daa9f96b2389eefbad713d2245a /daemon | |
parent | 12340cf1ef5065c5ab539967e610a263cc602741 (diff) |
fix RAM calculation on macOS in system-info (#13260)
Diffstat (limited to 'daemon')
-rwxr-xr-x | daemon/system-info.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/daemon/system-info.sh b/daemon/system-info.sh index c1914be790..101ccb0bf8 100755 --- a/daemon/system-info.sh +++ b/daemon/system-info.sh @@ -338,7 +338,7 @@ if [ "${KERNEL_NAME}" = FreeBSD ]; then TOTAL_RAM="$(sysctl -n hw.physmem)" elif [ "${KERNEL_NAME}" = Darwin ]; then RAM_DETECTION="sysctl" - TOTAL_RAM="$(sysctl -n hw.physmem)" + TOTAL_RAM="$(sysctl -n hw.memsize)" elif [ -r /proc/meminfo ]; then RAM_DETECTION="procfs" TOTAL_RAM="$(grep -F MemTotal /proc/meminfo | cut -f 2 -d ':' | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//' | cut -f 1 -d ' ')" |