New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network interface speed is sometimes a float number #2414

Closed
mohierf opened this Issue Jan 5, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@mohierf
Collaborator

mohierf commented Jan 5, 2018

The network interface speed provided by the agent is sometimes a float number:

    <NETWORKS>
      <DESCRIPTION>Intel(R) Ethernet Connection (4) I219-LM</DESCRIPTION>
      <MACADDR>D4:81:D7:D6:12:87</MACADDR>
      <PCIID>8086:15D7:079F:1028</PCIID>
      <PNPDEVICEID>PCI\VEN_8086&amp;DEV_15D7&amp;SUBSYS_079F1028&amp;REV_21\3&amp;11583659&amp;0&amp;FE</PNPDEVICEID>
      <SPEED>9223372036854.78</SPEED>
      <STATUS>Down</STATUS>
      <TYPE>ethernet</TYPE>
      <VIRTUALDEV>0</VIRTUALDEV>
    </NETWORKS>

The speed should be ignored and set to 0 rather than displayed as an inconsistent float number !

@mohierf

This comment has been minimized.

Collaborator

mohierf commented Jan 5, 2018

Rather than testing if the collected interface speed is_numeric I propose to test if is_int ...

mohierf added a commit to mohierf/fusioninventory-for-glpi that referenced this issue Jan 5, 2018

mohierf added a commit to mohierf/fusioninventory-for-glpi that referenced this issue Jan 5, 2018

@AnaelMobilia

This comment has been minimized.

Contributor

AnaelMobilia commented Jan 5, 2018

Hi,

I think that a issue should be opened (too) against the agent (with the real value of the network speed) in order to fix this on it's source.

Regards,
Anael

mohierf added a commit to mohierf/fusioninventory-for-glpi that referenced this issue Jan 13, 2018

mohierf added a commit to mohierf/fusioninventory-for-glpi that referenced this issue Jan 13, 2018

mohierf added a commit to mohierf/fusioninventory-for-glpi that referenced this issue Jan 17, 2018

wawax pushed a commit that referenced this issue Jan 18, 2018

Fix #2414 - set network speed interface to 0 if is is not an integer … (
#2415)

* Fix #2414 - set network speed interface to 0 if is is not an integer number - fix bad test

@wawax wawax closed this in 576ba82 Jan 18, 2018

mohierf added a commit to mohierf/fusioninventory-for-glpi that referenced this issue Jan 19, 2018

Fix fusioninventory#2414 - set network speed interface to 0 if is is …
…not an integer … (fusioninventory#2415)

* Fix fusioninventory#2414 - set network speed interface to 0 if is is not an integer number - fix bad test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment