mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Merge pull request #17330 from derekwaynecarr/free_mem
Auto commit by PR queue bot
This commit is contained in:
commit
0dbadda69e
@ -416,12 +416,12 @@ kube::golang::build_binaries_for_platform() {
|
||||
done
|
||||
}
|
||||
|
||||
# Return approximate physical memory in gigabytes.
|
||||
# Return approximate physical memory available in gigabytes.
|
||||
kube::golang::get_physmem() {
|
||||
local mem
|
||||
|
||||
# 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 ))
|
||||
return
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user