8 lines
235 B
Bash
8 lines
235 B
Bash
#!/bin/bash
|
|
# Show used and total memory
|
|
|
|
available=$(awk '/MemAvailable/ {$2=$2/1024; printf("%3.2f\n", $2)}' /proc/meminfo)
|
|
total=$(awk '/MemTotal/ {$2=$2/1024**2; printf("%3.1f\n", $2)}' /proc/meminfo )
|
|
|
|
echo "${available}"
|
|
echo ""
|