如何查看 AIX 上的可用内存?free -m
其下无有。
AIX 操作系统级别:6100-03-03-0943
答案1
svmon
例如
# svmon
size inuse free pin virtual
memory 131072 114552 16520 34191 151562
pg space 655360 78472
work pers clnt other
pin 30911 6 0 3274
in use 83264 31288 0
或vmstat
如已经所示 ( vmstat -v
)
答案2
用这个:
lsattr -El mem0
vmstat -v
答案3
创建一个类似的脚本checkmemory.sh
并放置以下代码:
#!/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 "\n\n-----------------------";
echo " Users Login information \n";
for ENTRY in `finger | cut -d " " -f1 | grep -v Login | uniq`
do
echo "`finger -l $ENTRY | head -1 | cut -d \" \" -f14` ---> `finger -l $ENTRY |
awk '{ print $2 }' | tail -2 | head -1`";
#finger -l $ENTRY | awk '{ print $2 }' | tail -2 | head -1;
done
echo "-----------------------\n";
echo "\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";
它将显示系统的总内存、可用内存和已用内存以及远程登录的用户。
答案4
# lparstat -i |egrep -i "Online|Maximum" |grep -i Memory
Online Memory : 49152 MB
Maximum Memory : 73728 MB