[ZBX-6902] system.swap.size broken on Solaris Created: 2013 Aug 16  Updated: 2017 May 30  Resolved: 2013 Sep 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.0.7
Fix Version/s: 2.0.9rc1, 2.1.5

Type: Incident report Priority: Major
Reporter: Andrew Howell Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: regression, solaris, swap
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris 10 & 11 on sparc and x86


Issue Links:
Duplicate

 Description   

Since 2.0.7 system.swap.size is reporting wrong values for total and free.

A sol11 x86 server with 4 GB of swap is reporting it has 48 GB
A sol11 sparc server with 256 swap is reporting 340 GB
a sol10 sparc server with 24 GB swap is reporting 1.4 GB
a sol10 x86 server with 144 GB swap is reporting 190 GB



 Comments   
Comment by Andrew Howell [ 2013 Aug 16 ]

I'm assuming ZBX-6470 broke this.

Comment by Andris Mednis [ 2013 Aug 20 ]

Could you please check is Zabbix agent compiled as 64-bit binary ? For example, by running "file sbin/zabbix_agentd".
(I think it should be because Zabbix 2.0.7 includes a fix ZBX-6637)

Comment by Andrew Howell [ 2013 Aug 21 ]

Solaris 11 x86 (X4270 M3) is 64 bit (compiled with Solaris Studio 12.3)
Solaris 11 sparc (T4-2) is 64 bit (compiled with Solaris Studio 12.3)
solaris 10 sparc (T2000) is 32 bit (compiled with Studio 11, looks like it's a 32 bit version of the compiler)
solaris 10 x86 (X4270) is 64 bit (compiled with Studio 12.1)

Comment by Andris Mednis [ 2013 Aug 22 ]

Hi, Andrew!

I think nothing is broken, it was just changed in Zabbix 2.0.7.

In Zabbix 2.0.6 system.swap.size[,total], system.swap.size[,pused], system.swap.size[,pfree] are calculated like in "swap -l".

  • system.swap.size[,total] is a stable value (i.e. sum of swap volumes and swap files configured, as shown by "swap -l").
  • if there is enough memory and swap is not used at all, then
    system.swap.size[,pused] = 0 % and
    system.swap.size[,pfree] = 100 % - easy to understand. System has enough memory.

In Zabbix 2.0.7 system.swap.size[,total], system.swap.size[,pused], system.swap.size[,pfree] are calculated like in "swap -s".

  • in addition to swap devices shown by "swap -l", free memory is also taken into account.
  • system.swap.size[,total] is a fluctuating value, because it is influenced by amount of free memory at the moment. This may confuse users who know exactly how much swap they have configured on their servers.
  • if there is enough memory and swap is not used at all, then
    system.swap.size[,pused] > 0 % and
    system.swap.size[,pfree] < 100 % - this can be confusing. Monitoring system.swap.in[,pages], system.swap.out[,pages] and examining "swap -l" output can help to find out is system swapping or not.

Is Solaris swap reporting better in Zabbix v.2.0.6 than in v.2.0.7 ?

To explain your 4 cases, can you check what "swap -s" and "swap -l" show on these servers ?

Comment by Andrew Howell [ 2013 Aug 22 ]

Yes the swap -s vs swap -l explains the results.

I think this was a retrograde step. It now doesn't match how swap is reported on linux. Plus as you say yourself it's extremely confusing to users.

Plus this behavior change wasn't mentioned at all in the what's new or release notes. It's broken triggers and items update intervals need changing.

I would like to request that it's reversed. Total swap space should report that, not swap + memory.

Comment by Andris Mednis [ 2013 Aug 23 ]

It was decided to revert changes in Solaris swap reporting which were made in ZBX-6470 for Zabbix 2.0.7 and go back to the old method used in Zabbix 2.0.6.

Comment by Andris Mednis [ 2013 Sep 02 ]

Available in development branch svn://svn.zabbix.com/branches/dev/ZBX-6902, tested on Solaris 10 x86.

Comment by Andrew Howell [ 2013 Sep 03 ]

Will this make it into 2.0.9?

Comment by Andris Mednis [ 2013 Sep 03 ]

Most likely, yes.

Comment by Alexander Vladishev [ 2013 Sep 03 ]

Successfully tested!

Please review my changes in r38289:38292.

andris Thanks! Changes accepted.

Comment by Andris Mednis [ 2013 Sep 03 ]

Fixed in versions pre-2.0.9 rev. 38294 and pre-2.1.5 rev. 38426.

Generated at Thu Apr 25 04:58:26 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.