[ZBX-4905] system.swap.in/out[,pages] always returns 0 Created: 2012 Apr 23  Updated: 2017 May 30  Resolved: 2012 Apr 28

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.0.0rc3
Fix Version/s: 1.8.13rc1, 2.0.0rc4

Type: Incident report Priority: Minor
Reporter: Andrew Howell Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

RHEL 6.2



 Description   

Is system.swap.in[,pages] and system.swap.out[,pages] supposed to work under linux 2.6?

It always returns 0



 Comments   
Comment by Alexander Vladishev [ 2012 Apr 24 ]

Fixed in the development branch svn://svn.zabbix.com/branches/dev/ZBX-4905

Comment by dimir [ 2012 Apr 26 ]

(1) So, to summarize, where do we get swap information from:

partitions: /proc/swaps
pages: /proc/stat (2.4), /proc/vmstat (2.6)
count, sectors: /proc/partitions (2.4), /proc/diskstats (2.6)

<richlv> awesome ! let's add this somewhere in the docs
(users are asking such questions every now and then)

<Sasha> It is a low-level technical information. Really it shall be in user documentation?

<richlv> indeed, it's low level, but there's large enough interest from users about it. of course, it shouldn't be the first thing on the item page, but there must be a place where we can document also more advanced stuff (we already have partial agent protocol docs and distributed mode id description etc)

<dimir> There is probably a lot of info to share on the sysinfo stuff. Maybe we could put a sysinfo section to appendix and put there all these things, like e. g.: http://www.zabbix.com/documentation/2.0/manual/appendix/items/vm.memory.size_params

<martins-v>I think the info in the beginning of this comment could easily be included in the agent item table, last column (with system.swap.in/out items).

<martins-v>The information on sources added here (with system.swap.in/out/size items):

http://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/zabbix_agent

Should be reviewed and verified.

<Sasha> Fixed mistakes. Please review.

<dimir> Looks good from the technical point of view.
<martins-v> Thanks, looks good.

<Sasha> CLOSED

Comment by dimir [ 2012 Apr 26 ]

(2) Let's fix this right here. While documentation states default mode is "count" this is not true in case of Linux. The default under Linux is "pages". Although for consistency it's best to fix Linux code we decided not to do that at this point but instead fix the documentation. In addition let's fix some other things, so in total we have:

  • different defaults depending on OS
  • pages will work only if device was not specified
  • specifying device (must be empty or "all") is only supported under Linux

Some related parts of the docs look messy now but I think it perfectly reflects the situation with the swap code. I think in the future some time should be spent on it to bring some order. Meanwhile, look for system.swap.[in|out] changes:

http://www.zabbix.com/documentation/1.8/manual/config/items#supported_by_platform (1.8)
http://www.zabbix.com/documentation/1.8/manual/config/items#zabbix_agent (1.8)
http://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/zabbix_agent#supported_item_keys (2.0)
http://www.zabbix.com/documentation/2.0/manual/appendix/items/supported_by_platform (2.0)

<dimir> RESOLVED
<Sasha> CLOSED

Comment by dimir [ 2012 Apr 26 ]

Successfully tested, it also works for 2.6 now and also the ins/outs are fixed according to reads/writes.

Please review my small change in r27115.

<Sasha> CLOSED

Comment by Alexander Vladishev [ 2012 Apr 27 ]

Fixed in versions pre1.8.13rc1 r27140 and pre-2.0.0rc4 r27142.

Comment by Alexander Vladishev [ 2012 Apr 27 ]

Related issue: ZBX-4907

Comment by richlv [ 2012 Apr 27 ]

reopening to deal with (1)

Generated at Tue Apr 23 19:59:32 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.