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

      [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)
              {
      

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

              Created:
              Updated:
              Resolved: