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
AIX Creating EtherChannel Devices from Command Line
Viewed 5487 times since Mon, Jun 3, 2019
Topics: AIX, Networking, System Admin
Viewed 12592 times since Fri, Apr 19, 2019
Writing a Custom PVID
Viewed 4141 times since Fri, Feb 1, 2019
How to set Kernel Parameters in AIX ?
Viewed 17310 times since Tue, Jul 2, 2019
How do I analyze and debug core files on AIX
Viewed 9012 times since Thu, Feb 21, 2019
7 Tips – Tuning Command Line History in Bash
Viewed 7336 times since Fri, Jul 5, 2019
Tips I Picked up at the Power Systems Technical University
Viewed 4560 times since Mon, Jun 11, 2018
Changing ’defined’ or ’missing’ hard disk states to ’Available’ in IBM Smart Analytics System for AIX environment
Viewed 3416 times since Thu, Sep 20, 2018
Manages processor scheduler tunable parameters schedo AIX
Viewed 3572 times since Thu, Sep 20, 2018
Calculate hdisk READ / WRITE throughput (sequential IO) from AIX systems
Viewed 3591 times since Thu, Feb 21, 2019