TOTAL/USED/AVAILABLE memory in AIX
#!/usr/bin/ksh
#memory calculator
um=`svmon -G | head -2|tail -1| awk {‘print $3’}`
um=`expr $um / 256`
tm=`lsattr -El sys0 -a realmem | awk {‘print $2’}`
tm=`expr $tm / 1000`
fm=`expr $tm – $um`
echo “\n\n———————–“;
echo “System : (`hostname`)”;
echo “———————–\n\n”;
echo “Memory Information\n\n”;
echo “total memory = $tm MB”
echo “free memory = $fm MB”
echo “used memory = $um MB”
echo “\n\n———————–\n”;
Save the above script in a file and execute it.
#vi mem_calci —> paste the above script and save it
#chmod +x mem_calci —> provide the execute permission
#./mem_calci —> run the script
Sample output:
System : (Hostname)
———————–
Memory Information
total memory = 8126 MB
free memory = 6328 MB
used memory = 1798 MB
———————–
Recent Comments