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
Posted - Thu, Nov 29, 2018 5:37 PM. This article has been viewed 4156 times.
Filed Under:
AIX
There are no attachments for this article.
There are no comments for this article. Be the first to post a comment.
Related Articles

AIX Full memory dump configure
Viewed 4228 times since Mon, Jul 16, 2018
Aix: How to assign a specific PVID
Viewed 9025 times since Fri, Feb 1, 2019
Firmware Assisted Dump sysdump
Viewed 3077 times since Mon, Jul 16, 2018
LVM: Unmirror/Mirror "rootvg" Volume Group
Viewed 4558 times since Mon, May 21, 2018
Writing a Custom PVID
Viewed 3875 times since Fri, Feb 1, 2019
LVM: Shrink & extend a filesystem/volume
Viewed 2898 times since Sun, Jun 3, 2018
Unlock User ID in IBM AIX
Viewed 16840 times since Mon, May 28, 2018
HMC: HMC and LPAR management commands
Viewed 9058 times since Sun, Jun 3, 2018