0

I want generate monthly report from sar, but I confuse how to calculate memory available from sar.

After several hours searching, I get from some website, it said

available_mem = kbmemfree + kbbuffers + kbcached

but when I check in my server, available_mem from sar is very different with free command.

Here is my server log:

$ sar -r 1 1;free -k;free -g

Linux 3.10.0-862.14.4.el7.x86_64 (prod-app1)     05/16/19        _x86_64_        (128 CPU)

12:51:39    kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   %commit  kbactive   kbinact   kbdirty
12:51:40    995496568 1117677436     52.89      4240 968888724 454611944     21.18 619007232 449152476     54628
Average:    995493420 1117680584     52.89      4240 968893239 454605537     21.18 619006300 449156395     26660


              total        used        free      shared  buff/cache   available
Mem:     2113174004   117377256   995490844   398954456  1000305904  1580747996
Swap:      33554428           0    33554428


              total        used        free      shared  buff/cache   available
Mem:           2015         111         949         380         953        1507
Swap:            31           0          31

Base on my log, if I calculate available_mem, I got kbmemfree + kbbuffers + kbcached = 1964389532 KB = 1873 GB

but free command said available memory = 1507 GB

Thanks in advance.

New contributor
arputra is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Your Answer

arputra is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.