ZABBIX FEATURE REQUESTS
  1. ZABBIX FEATURE REQUESTS
  2. ZBXNEXT-1024

Add/delete some modes for vm.memory.size key under FreeBSD (or all BSD) and other OS

    Details

    • Type: Change Request Change Request
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.9.9 (beta)
    • Component/s: Agent (G)
    • Labels:
    • Environment:
      FreeBSD

      Description

      Now in Zabbix we have many parameters for monitoring memory under FreeBSD: vm.memory.size[<mode>]
      <mode> can be:

      total
      free
      used
      shared
      cached

      5 parameters! ('pfree' and 'pused' doesn't work in my servers, and doesn't work correct anyway) Ok, not bad.
      But I don't know what does 'shared' and 'used' parameters mean.

      If you use FreeBSD go to `top`. At head you can see memory parts:
      Active, Inact, Wired, Cache, Buf and Free. You can't see 'shared' and 'used' parameters. And you don't know how to get correct or real free memory!

      In order to know REAL FREE MEMory you need:
      1. Get from sysctl folowing vars:

      "vm.stats.vm.v_inactive_count" * "vm.stats.vm.v_page_size" (lets call it INACT)
      "vm.stats.vm.v_cache_count" * "vm.stats.vm.v_page_size" (CACHE)
      "vm.stats.vm.v_free_count" * "vm.stats.vm.v_page_size" (FREE)

      2. Calculate REAL FREE MEMory:
      free_mem = INACT + CACHE + FREE

      3. If you want to get REAL USED MEMory:
      total_mem = "vm.stats.vm.v_page_count" * "vm.stats.vm.v_page_size" (it defines correct in zabbix)
      used_mem = total_mem - free_mem

      Conclusion 4 developers:
      Please make correct calculation of FreeBSD memory!
      You need add INACT (sysclt vm.stats.vm.v_inactive_count) mode to vm.memory.size.
      Then make 'pfree' and 'pused' mode calculation as I described below (real free and real used memory).
      I think you need to delete 'shared' and 'used' modes for fbsd, because it is not necessary under FreeBSD.

      Thanks!

      P.S. maybe it right for all BSD systems.

      ____________

      В общем сейчас Zabbix умеет мониторить не очень-то полезные для FreeBSD (а может и для всех BSD) значения vm.memory.size:
      shared и used (я даже не знаю что это за значения такие)
      В то же время отсутствует мониторинг значения inactive памяти (да и active).
      К тому же у меня нигде не заработали режимы pused и pfree, ди и они тоже бесполезные.

      Чтобы узнать реально доступную для приложений свободную память, т.е. до того как начнет активно использоваться swap, нужно произвести рассчеты указанные выше.
      Спасибо!

      1. patch-src_freebsd_mem.c
        7 kB
        Pavel Timofeev
      1. memusage_with_patch_desc.png
        32 kB
      2. memusage_with_patch.png
        67 kB

        Issue Links

          Activity

            People

            • Assignee:
              dimir
              Reporter:
              Pavel Timofeev
            • Votes:
              2 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: