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

          Pavel Timofeev created issue -
          Pavel Timofeev made changes -
          Field Original Value New Value
          Attachment zbx_bsd_mem.patch_total [ 15267 ]
          Pavel Timofeev made changes -
          Attachment zbx_bsd_mem.patch_total [ 15267 ]
          Pavel Timofeev made changes -
          Attachment patch-src_freebsd_mem.c [ 15273 ]
          Pavel Timofeev made changes -
          Attachment patch-src_freebsd_mem.c [ 15273 ]
          Pavel Timofeev made changes -
          Attachment patch-src_freebsd_mem.c [ 15298 ]
          Pavel Timofeev made changes -
          Project ZABBIX FEATURE REQUESTS [ 10144 ] ZABBIX BUGS AND ISSUES [ 10000 ]
          Key ZBXNEXT-774 ZBX-3836
          Workflow jira [ 20594 ] Zabbix workflow [ 20696 ]
          Component/s Agent (Unix) [ 10004 ]
          Component/s Agent (unix) [ 10061 ]
          Component/s Server (general) [ 10068 ]
          Pavel Timofeev made changes -
          Attachment memusage_with_patch.png [ 15863 ]
          Attachment memusage_with_patch_desc.png [ 15864 ]
          Alexei Vladishev made changes -
          Labels freebsd
          Fix Version/s 2.0 [ 10402 ]
          Zabbix ID NA Reviewed 2.0
          Aleksandrs Saveljevs made changes -
          Project ZABBIX BUGS AND ISSUES [ 10000 ] ZABBIX FEATURE REQUESTS [ 10144 ]
          Key ZBX-3836 ZBXNEXT-1024
          Workflow Zabbix workflow [ 20696 ] ZBXNEXT workflow [ 23537 ]
          Fix Version/s 2.0 [ 10062 ]
          Fix Version/s 2.0 [ 10402 ]
          Component/s Agent (unix) [ 10061 ]
          Component/s Agent (Unix) [ 10004 ]
          Aleksandrs Saveljevs made changes -
          Assignee Alexei Vladishev [ alexei ] Aleksandrs Saveljevs [ asaveljevs ]
          Aleksandrs Saveljevs made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          Aleksandrs Saveljevs made changes -
          Status In Progress [ 3 ] Resolved [ 5 ]
          Assignee Aleksandrs Saveljevs [ asaveljevs ]
          Resolution Fixed [ 1 ]
          dimir made changes -
          Assignee Vladimir Levijev [ dimir ]
          richlv made changes -
          Link This issue is duplicated by ZBX-4419 [ ZBX-4419 ]
          Oleksiy Zagorskyi made changes -
          Summary Add/delete some modes for vm.memory.size key under FreeBSD (or all BSD) Add/delete some modes for vm.memory.size key under FreeBSD (or all BSD) and other OS
          Labels freebsd freebsd memory
          dimir made changes -
          Status Resolved [ 5 ] Tested [ 10002 ]
          dimir made changes -
          Status Tested [ 10002 ] Closed [ 6 ]
          Fix Version/s 1.9.9 [ 10801 ]
          Fix Version/s 2.0 [ 10062 ]
          Alexander Vladishev made changes -
          Link This issue duplicates ZBXNEXT-144 [ ZBXNEXT-144 ]
          Alexander Vladishev made changes -
          Workflow ZBXNEXT workflow [ 23537 ] Zabbix workflow [ 32355 ]
          Alexei Vladishev made changes -
          Workflow Zabbix workflow [ 32355 ] Zabbix workflow - new [ 39680 ]
          Alexander Vladishev made changes -
          Workflow Zabbix workflow - new [ 39680 ] Copy of Zabbix workflow - new [ 73371 ]
          Alexander Vladishev made changes -
          Workflow Copy of Zabbix workflow - new [ 73371 ] Zabbix workflow - new [ 88655 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: