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 3525 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

Epoch & Unix Timestamp Conversion Tools
Viewed 63002 times since Fri, Jun 22, 2018
AIX, System Admin Configuring dsh DSH
Viewed 4189 times since Fri, Apr 19, 2019
O’Reilly’s CD bookshelf
Viewed 12984 times since Wed, Jun 27, 2018
sysdumpdev Command
Viewed 1996 times since Mon, Jul 16, 2018
LVM: Unmirror/Mirror "rootvg" Volume Group
Viewed 3521 times since Mon, May 21, 2018
Control Your Logs AIX
Viewed 19229 times since Wed, May 30, 2018
How to Investigate a System Reboot
Viewed 4731 times since Mon, Jul 16, 2018
AIX Errpt - Diag - Alog
Viewed 3842 times since Wed, Mar 20, 2019