Script to show Total, Free and Used Memory on AIX
Article Number: 443 | Rating: Unrated | Last Updated: Thu, Nov 29, 2018 5:37 PM
Just Copy and Paste:
(memory=`prtconf -m | awk 'BEGIN {FS=" "} {print $3/1024}'`
usedmem=`svmon -G | grep memory | awk 'BEGIN {FS=" "} {print $3/256/1024}'`
freemem=`echo $memory-$usedmem | bc -l`
clear
echo
echo "Memory Results:"
echo "----------------------"
echo
echo "Avai Mem: $memory GB"
echo "Free Mem: $freemem GB"
echo "Used Mem: $usedmem GB"
echo
echo)
Result:
Memory Results:
----------------------
Avai Mem: 2 GB
Free Mem: 0.69649 GB
Used Mem: 1.30351 GB