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