Where is the linux mem gone?
#/bin/bash
for PROC in `ls /proc/|grep "^[0-9]"`
do
if [ -f /proc/$PROC/statm ]; then
TEP=`cat /proc/$PROC/statm | awk '{print ($2)}'`
RSS=`expr $RSS + $TEP`
fi
done
RSS=`expr $RSS \* 4`
PageTable=`grep PageTables /proc/meminfo | awk '{print $2}'`
SlabInfo=`cat /proc/slabinfo |awk 'BEGIN{sum=0;}{sum=sum+$3*$4;}END{print sum/1024/1024}'`
echo $RSS"KB", $PageTable"KB", $SlabInfo"MB" printf "rss+pagetable+slabinfo=%sMB\n" `echo $RSS/1024 + $PageTable/1024 + $SlabInfo|bc` free -m
I use the shell sum my mem is shows
rss+pagetable+slabinfo=19422.716MB
and use free -m total used free shared buff/cache available Mem: 64150 60728 1955 61 1465 2866 Swap: 16383 3490 12893
It shows mem used 60728m where is the other mem gone? somebody konws ? thanks
0 comments
[ 0.21 ms ] story [ 9.7 ms ] threadNo comments yet.