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
Writing a Custom PVID
Viewed 2675 times since Fri, Feb 1, 2019
AIX, Red Hat, Security, System Admin↑ System-wide separated shell history files for each user and session
Viewed 1997 times since Fri, Apr 19, 2019
How to check VLAN ID number on AIX?
Viewed 12189 times since Mon, May 28, 2018
AIX: How to identify the program listening in the given port
Viewed 2175 times since Mon, Jun 11, 2018
AIX - How to unlock and reset user’s account
Viewed 15846 times since Fri, Jun 8, 2018
Migrating from SDDPCM to AIXPCM (the easy way)
Viewed 2278 times since Mon, Jun 3, 2019
AIX NFS Version 4 configuration over Kerberos inter-realm setup
Viewed 3610 times since Wed, Jun 27, 2018
AIX NTP Client configuration
Viewed 11433 times since Tue, Jul 17, 2018
List STALE partitions across Volume Groups for each Logical Volume in AIX
Viewed 2260 times since Tue, Jul 17, 2018
How to build a NIM Server on AIX 6.1 from the Scratch :: Part 1
Viewed 4529 times since Thu, Nov 29, 2018