Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-22282

Some supported vm.memory.size parameters are listed as not supported

XMLWordPrintable

    • Icon: Documentation task Documentation task
    • Resolution: Cannot Reproduce
    • Icon: Trivial Trivial
    • None
    • 4.0.44, 5.0.30, 6.0.11
    • None
    • None

      The following document states that the active, anon and inactive parameters of vm.memory.size are not supported.

       https://www.zabbix.com/documentation/5.0/en/manual/appendix/items/supported_by_platform

      But it's available to get their values.
      Also, it's implemented as follows.

      242: int    VM_MEMORY_SIZE(AGENT_REQUEST *request, AGENT_RESULT *result)
      243: {
      244:     char   *mode;
      245:     int    ret;
      246: 
      247:     if (1 < request->nparam)
      248:     {
      249:         SET_MSG_RESULT(result, zbx_strdup(NULL, "Too many parameters."));
      250:         return SYSINFO_RET_FAIL;
      251:     }
      252: 
      253:     mode = get_rparam(request, 0);
      254: 
      255:     if (NULL == mode || '\0' == *mode || 0 == strcmp(mode, "total"))
      256:         ret = VM_MEMORY_TOTAL(result);
      257:     else if (0 == strcmp(mode, "free"))
      258:         ret = VM_MEMORY_FREE(result);
      259:     else if (0 == strcmp(mode, "buffers"))
      260:         ret = VM_MEMORY_BUFFERS(result);
      261:     else if (0 == strcmp(mode, "used"))
      262:         ret = VM_MEMORY_USED(result);
      263:     else if (0 == strcmp(mode, "pused"))
      264:         ret = VM_MEMORY_PUSED(result);
      265:     else if (0 == strcmp(mode, "available"))
      266:         ret = VM_MEMORY_AVAILABLE(result);
      267:     else if (0 == strcmp(mode, "pavailable"))
      268:         ret = VM_MEMORY_PAVAILABLE(result);
      269:     else if (0 == strcmp(mode, "shared"))
      270:         ret = VM_MEMORY_SHARED(result);
      271:     else if (0 == strcmp(mode, "cached"))
      272:         ret = VM_MEMORY_PROC_MEMINFO("Cached:", result);
      273:     else if (0 == strcmp(mode, "active"))
      274:         ret = VM_MEMORY_PROC_MEMINFO("Active:", result);
      275:     else if (0 == strcmp(mode, "anon"))
      276:         ret = VM_MEMORY_PROC_MEMINFO("AnonPages:", result);
      277:     else if (0 == strcmp(mode, "inactive"))
      278:         ret = VM_MEMORY_PROC_MEMINFO("Inactive:", result);
      279:     else if (0 == strcmp(mode, "slab"))
      280:         ret = VM_MEMORY_PROC_MEMINFO("Slab:", result);
      281:     else
      282:     {
      283:         SET_MSG_RESULT(result, zbx_strdup(NULL, "Invalid first parameter."));
      284:         ret = SYSINFO_RET_FAIL;
      285:     }
      286: 
      287:     return ret;
      288: }
      

            aigars.kadikis Aigars Kadikis
            Taiki Fujiwara Taiki Fujiwara
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: