Script to show Total, Free and Used Memory on AIX

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
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Part 2, Monitoring memory usage (ps, sar, svmon, vmstat) and analyzing the results AIX7
Viewed 12946 times since Wed, Jun 19, 2019
AIX Different Commands For Paging Space Administration swap file create
Viewed 7595 times since Thu, Aug 1, 2019
LVM: Extend an existing Volume Group by adding a new disk
Viewed 5786 times since Sat, Jun 2, 2018
AIX - How to monitor memory usage
Viewed 5712 times since Fri, Jun 8, 2018
AIX Assign a PVID to a new hdisk
Viewed 6704 times since Tue, Jul 17, 2018
0516-787 extendlv: Maximum allocation for logical volume error
Viewed 9194 times since Tue, Mar 12, 2019
AIX, Monitoring, System Admin↑ NMON recordings
Viewed 3131 times since Fri, Apr 19, 2019
R2dump debug tool
Viewed 2376 times since Tue, Sep 8, 2020
Mirroring session (TTY) on AIX using portmir
Viewed 9505 times since Thu, Feb 21, 2019
Undocumented AIX command lquerypv
Viewed 3808 times since Mon, Jul 16, 2018