Ad Widget

Collapse

How does zabbix exactly count available RAM on Linux ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • airocat
    Junior Member
    • Aug 2016
    • 1

    #1

    How does zabbix exactly count available RAM on Linux ?

    Hello All!

    I want to monitor amount of available RAM on my Linux server. But I don't completely understand how Zabbix gets this value.

    Server OS - Debian 8, x86_64
    Zabbix version - 3.0

    According to the docs:



    From Platform-specific notes we can see:

    On Linux available is free + buffers + cached (There is no such information in 3.0 section, but I suppose it should be the same)


    I can see different picture in my case:

    #zabbix_get -s host -k 'vm.memory.size[free]'
    252035072
    #zabbix_get -s host -k 'vm.memory.size[buffers]'
    1649950720
    #zabbix_get -s host -k 'vm.memory.size[cached]'
    6410240000

    The sum off free buffers and cached is 8312225792.

    But:

    # zabbix_get -s host -k 'vm.memory.size[available]'
    10890870784

    So, how really this value was calculated ?

    Thanks in advance
  • guzzijason
    Senior Member
    • Dec 2015
    • 106

    #2
    Perhaps it varies based on OS?

    On an Ubuntu 14.04 host, the output of free -m looks like this:

    Code:
    # free -m
                 total       used       free     shared    buffers     cached
    Mem:        257837       7737     250099         16        279       4927
    -/+ buffers/cache:       2530     255306
    Swap:            0          0          0
    and in this case, the "available" memory reported by zabbix seems to correlate with ( free + buffers + cached ) / 1024 .

    Howerver, on a CentOS 7 host, free -m looks like this:

    Code:
    # free -m
                  total        used        free      shared  buff/cache   available
    Mem:           7822        5288         575         247        1958        1998
    Swap:          9215           0        9215
    ... and the "available" memory reported by zabbix seems to line up the the available memory shown in the free output (divided by 1024).

    __Jason

    Comment

    Working...