1826510 Members
3255 Online
109694 Solutions
New Discussion

Free V SAR

 
Duffs
Regular Advisor

Free V SAR

Hi,

I had a server that experienced a crash last night and when I looked at the SAR report it showed that the "%memused" was 98%. On comparing this today with the memory info displayed from the "free" command, there appears to be a considerable difference (See below). Can anybody explain what the difference is between the two and what is the true reflection of what memory the box is using?

# sar -r -f /var/log/sa/sa23 (shows "memused" @ 79%:

03:35:01 PM kbmemfree kbmemused %memused kbbuffers kbcached kbswpfree kbswpused %swpused kbswpcad
03:40:01 PM 9198600 56784520 86.06 630044 21133808 65535992 0 0.00 0
03:45:01 PM 9195232 56787888 86.06 630292 21134048 65535992 0 0.00 0
03:50:01 PM 9170532 56812588 86.10 630584 21133872 65535992 0 0.00 0
03:55:01 PM 9149868 56833252 86.13 630856 21134152 65535992 0 0.00 0
Average: 13659699 52323421 79.30 554684 19173568 65535992 0 0.00 0

However free only suggests that the box is using 53%:

[root@fworksdb2 ~]# free -b|grep ^-|awk '{ print (($3/($3+$4))*100) "% Used" }'
53.1834% Used

Rgds,
D.
1 REPLY 1
Tim Nelson
Honored Contributor

Re: Free V SAR

keep in mind that the first line of free command includes the allocated cache.

linux will use all available mem for cache and give back as needed.


look at the -/+ buffers/cache line for the real numbers.