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

Sometimes system.swap.*[,pages] key return incorrect result

    XMLWordPrintable

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 2.4.5
    • Fix Version/s: 2.4.6rc1, 2.5.0
    • Component/s: Agent (G)
    • Labels:
    • Environment:
      Solaris OS

      Description

      [root@zabbix]# /usr/local/zabbix/bin/zabbix_get -s1 -k "system.swap.out[,pages]"
      17460
      [root@zabbix]# /usr/local/zabbix/bin/zabbix_get -s1 -k "system.swap.out[,pages]"
      19206
      [root@zabbix]# /usr/local/zabbix/bin/zabbix_get -s1 -k "system.swap.out[,pages]"
      20952
      [root@zabbix]# /usr/local/zabbix/bin/zabbix_get -s1 -k "system.swap.out[,pages]"
      4692609558835627730
      [root@zabbix]# /usr/local/zabbix/bin/zabbix_get -s1 -k "system.swap.out[,pages]"
      4692609558835629476
      

      it happens because we do not reset new variable. It can contain garbage:

      Index: src/libs/zbxsysinfo/solaris/swap.c
      ===================================================================
      --- src/libs/zbxsysinfo/solaris/swap.c  (revision 53800)
      +++ src/libs/zbxsysinfo/solaris/swap.c  (working copy)
      @@ -311,7 +311,7 @@
       {
              int             ret;
              char            *tmp, *error;
      -       zbx_uint64_t    value;
      +       zbx_uint64_t    value = 0;
       
              if (2 < request->nparam)
              {
      @@ -351,7 +351,7 @@
       {
              int             ret;
              char            *tmp, *error;
      -       zbx_uint64_t    value;
      +       zbx_uint64_t    value = 0;
       
              if (2 < request->nparam)
              {
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            dotneft Alexey Pustovalov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: