mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #17330 from derekwaynecarr/free_mem
Auto commit by PR queue bot
This commit is contained in:
		@@ -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
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user