1

I'd like to know if I can get memory in sar the same way I get it from free.

Currently free shows me a memory usage of 47.06% (16956/36027)*100 [used/total x 100]. Whereas sar is showing me a usage of almost 100%. The benefit of sar is that in my system, I can read values for the last 30 days, whereas free is just the current moment.

Is there any way to see in sar values similar to those shown by free?

Memory in Red Hat

2
  • 1
    Please don't post images of text. Copy and paste the text itself into your question and format it as code by selecting it and pressing Ctrl-K or by using the editor's {} icon, or by adding a line containing three backticks before AND after the text. Commented Jun 7 at 10:33
  • See a partial answer here serverfault.com/questions/1155631/… Commented Jun 7 at 11:45

1 Answer 1

1

Both sar and free use information from /proc/meminfo

The older versions of sar before 11.7.4 released 2018/06/01 calculated kbmemused as:

total installed memory - kbmemfree

After that version, the kbmemused is calculated the same way as free, see the current man sar:

total installed memory - kbmemfree - kbbuffers - kbcached - kbslab

Judging by your kernel version, you have RHEL 7/CentOS 7, which includes an older version. You can check it with sar -V and consult your local man sar what it says about kbmemused.

1
  • sar -V sysstat version 10.1.5 This is what man says: -r Report memory utilization statistics. The following values are displayed: kbmemfree Amount of free memory available in kilobytes. kbmemused Amount of used memory in kilobytes. This does not take into account memory used by the kernel itself. %memused Percentage of used memory. Commented Jun 10 at 1:29

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.