diff options
author | jim <645509024@qq.com> | 2020-09-05 01:04:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 13:04:52 -0400 |
commit | 5fe817361b5022a7e1923e4ae40645796da1055b (patch) | |
tree | 23e93b1791e7b377928629c51c6d5b87b4dd9e11 /daemon | |
parent | 3044764329e86e14d56aea0c1e43245da3cc238a (diff) |
Fixed lack of macOS RAM info in system-info.sh (#9882)
* fix lack macOS ram info in system-info.sh
* aligned spaces
Diffstat (limited to 'daemon')
-rwxr-xr-x | daemon/system-info.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/daemon/system-info.sh b/daemon/system-info.sh index dcdc099688..9ccb55d8fd 100755 --- a/daemon/system-info.sh +++ b/daemon/system-info.sh @@ -286,6 +286,9 @@ RAM_DETECTION="none" if [ "${KERNEL_NAME}" = FreeBSD ] ; then RAM_DETECTION="sysctl" TOTAL_RAM="$(sysctl -n hw.physmem)" +elif [ "${KERNEL_NAME}" = Darwin ] ; then + RAM_DETECTION="sysctl" + TOTAL_RAM="$(sysctl -n hw.physmem)" 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 ' ')" |