[ZBX-6046] net.if doesn't work on solaris 11 zones Created: 2013 Jan 02  Updated: 2024 Apr 10  Resolved: 2018 Jun 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.0.4
Fix Version/s: 3.0.19rc1, 3.4.11rc1, 4.0.0alpha8, 4.0 (plan)

Type: Problem report Priority: Major
Reporter: Andrew Howell Assignee: Michael Veksler
Resolution: Fixed Votes: 2
Labels: solaris
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Solaris 11 non global zone


Attachments: File fixed_net_c-fix_network_statistics_solaris_11.diff     File net_c-fix_network_statistics_solaris_11.diff     Text File zonecfg.txt    
Issue Links:
Duplicate
duplicates ZBX-10372 network interface statistics return 0... Closed
Team: Team C
Sprint: Sprint 18, Sprint 19, Sprint 20, Sprint 21, Sprint 22, Sprint 23, Sprint 33, Sprint 34, Sprint 35, Sprint 36
Story Points: 0.5

 Description   

On solaris 11 non global zones net.if.in/out/total all return 0 for packets and bytes. It does work for the global zone.

net.if.discovery does return the correct interface name.

dlstat does show stats for the interface



 Comments   
Comment by Jairo Eduardo Lopez Fuentes Nacarino [ 2013 Feb 12 ]

Hello!

Can you post how your zone is configured?

It is entirely possible for dlstat to show the data you require, while the Zabbix agent not to show it because they are using 2 completely different libraries to obtain the data.

Comment by Andrew Howell [ 2013 Feb 12 ]

zonecfg -z <zone> info output

Comment by Andrew Howell [ 2013 Feb 12 ]

Hi,

I've attached the configuration of the zone in question.

Comment by richlv [ 2013 Dec 04 ]

confirming with 2.2.1rc1 agent on SunOS 5.11 11.1 sun4v

Comment by Andrew Howell [ 2014 Apr 02 ]

Also noticed today that it doesn't work on the global zone for vlan interfaces

Comment by Rostislav Palivoda [ 2017 Nov 03 ]

Could you help us with environment to reproduce the problem and test fix patch? ahowell

Comment by Vladislavs Sokurenko [ 2017 Dec 05 ]

Could you please be so kind and provide full dlstat command ? Thanks !
Also it would be nice if you could print as much information as possible to see values of fields such as obytes and obytes64
For example by calling

kstat link:0:net0
Comment by Andrea Biscuola (Inactive) [ 2017 Dec 15 ]

The problem rely on the fact we don't check properly what
field the network driver decided to populate and how.
For example, obytes and obytes64 are exactly the same
thing as are rbytes and rbytes64. The difference is that the
former fields are 32 bit unsigned integer, while the latter
are 64 bit unsigned integer.

There are three possible cases how those fields are when
a driver implement it's kstat structures:

  • A really old driver is still working and it will still populate
    the 32 bit field only and the 64 bit one will be 0.
  • An old driver is updated and it will store the same data in
    both for backward compatibility
  • A new driver is implemented and as suggested, store the
    data in the 64 bit field only, thus leaving the 32 bit one
    set to 0.

If both the field are set, they MUST have the same value, but
there is the problem that the 32 bit field can wrap-around and
restart from 0 after some time, leaving the two field with
different values.

I would go for a solution as proposed by vso
as modern drivers will always prefer the 64 bit integer field.
Also, I think we should also always prefer it if possible when
it's > 0

Comment by Andrea Biscuola (Inactive) [ 2017 Dec 15 ]

Hi ahowell

I attached a patch to test. can you apply it to the zabbix agent
and check if the values are reported properly?

Regards

The file is:

net_c-fix_network_statistics_solaris_11.diff

Forgot to mention: The patch is for the zabbix agent 3.0 (currently
supported), but it should work also with 2.0

Comment by Andrea Biscuola (Inactive) [ 2017 Dec 15 ]

Hi aleksejs.petrovs

Oh, well, if one of our customers can test this, much appreciated!
Yes, the patch is for 3.0. We can't compile it here, so report if there
are compilation errors.

Thanks!

Comment by Andrea Biscuola (Inactive) [ 2017 Dec 19 ]

Corrected patch attached

Comment by Viktors Tjarve [ 2017 Dec 19 ]

Would it be possible to get log files from our customer who is having this issue? Specially interested if there has been any "Something impossible has just happened." entries in logs.

Comment by Viktors Tjarve [ 2018 Apr 27 ]

Added a fixed version of the patch that was added to this ticket previously.

Comment by Sergejs Paskevics [ 2018 Jun 11 ]

Successfully tested

Generated at Fri Apr 26 15:15:28 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.