Commit 0dbadda6 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #17330 from derekwaynecarr/free_mem

Auto commit by PR queue bot
parents 8500a0fe a043f3c8
...@@ -416,12 +416,12 @@ kube::golang::build_binaries_for_platform() { ...@@ -416,12 +416,12 @@ kube::golang::build_binaries_for_platform() {
done done
} }
# Return approximate physical memory in gigabytes. # Return approximate physical memory available in gigabytes.
kube::golang::get_physmem() { kube::golang::get_physmem() {
local mem local mem
# Linux, in kb # Linux, in kb
if mem=$(grep MemTotal /proc/meminfo | awk '{ print $2 }'); then if mem=$(grep MemAvailable /proc/meminfo | awk '{ print $2 }'); then
echo $(( ${mem} / 1048576 )) echo $(( ${mem} / 1048576 ))
return return
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment