Created
June 16, 2020 14:45
-
-
Save wallyhall/95edfce51eb9960c44d367b63c965de7 to your computer and use it in GitHub Desktop.
Approximately real free memory on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cat /proc/meminfo | awk 'BEGIN { i=0; } { if ( /^(MemFree|Buffers|Cache): *(\d*)/ ) { i += $2 ; } } END { print i / 1024 / 1024 " GB" }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment