Re: sfp module info and diagnostics

2019-04-09 Thread Hrvoje Popovski
On 8.4.2019. 22:13, Stuart Henderson wrote: > On 2019/04/08 19:55, Hrvoje Popovski wrote: >> On 8.4.2019. 11:33, David Gwynne wrote: >>> this updates the ifconfig part of the diff >> This is great feature... thank you .. >> it would be great if dBm could be exported via snmp :) > You can do this

Re: sfp module info and diagnostics

2019-04-09 Thread Hrvoje Popovski
On 8.4.2019. 19:55, Hrvoje Popovski wrote: > On 8.4.2019. 11:33, David Gwynne wrote: >> this updates the ifconfig part of the diff > > This is great feature... thank you .. maybe to put laser wavelength in sff output? ix0 - 1000BASE-LX x3550m4# ifconfig ix0 sff ix0: identifier SFP (03)

Re: sfp module info and diagnostics

2019-04-08 Thread Stuart Henderson
FWIW (I was interested so put something together), here's a sample diff on top with one method of printing alarms. (I went for the < > checks rather than table 3.18 flag bits, mostly because I didn't fancy the "check again after 100ms" that the latter wanted). --- sff.c.orig Mon Apr 8 22:27:45

Re: sfp module info and diagnostics

2019-04-08 Thread Stuart Henderson
On 2019/04/08 19:55, Hrvoje Popovski wrote: > On 8.4.2019. 11:33, David Gwynne wrote: > > this updates the ifconfig part of the diff > > This is great feature... thank you .. > it would be great if dBm could be exported via snmp :) You can do this via net-snmp already:

Re: sfp module info and diagnostics

2019-04-08 Thread Sebastian Benoit
David Gwynne(da...@gwynne.id.au) on 2019.04.08 19:33:53 +1000: > this updates the ifconfig part of the diff > > it should have the following improvements: > > - actually applying to -current (thanks hrvoje) > - use vis(3) when printing the strings out (thanks deraadt@) > - make the code less

Re: sfp module info and diagnostics

2019-04-08 Thread Hrvoje Popovski
On 8.4.2019. 11:33, David Gwynne wrote: > this updates the ifconfig part of the diff This is great feature... thank you .. it would be great if dBm could be exported via snmp :) switch - Dell S4810 ix0 - sfp+ 10GBASE-SR optics ix1 - sfp 1000BASE-SX optics ixl0 - 10G passive DAC cables

Re: sfp module info and diagnostics

2019-04-08 Thread Stuart Henderson
On 2019/04/08 13:57, Stuart Henderson wrote: > Here's a complete diff. Tested on amd64 with ix, working great there. > distrib/special/ifconfig still builds okay, I'll run a full mkr later on > i386/amd64. > > This is extremely useful for the bgpd "target market" ;) oops, here's attempt #2 with

Re: sfp module info and diagnostics

2019-04-08 Thread Stuart Henderson
Here's a complete diff. Tested on amd64 with ix, working great there. distrib/special/ifconfig still builds okay, I'll run a full mkr later on i386/amd64. This is extremely useful for the bgpd "target market" ;) Index: sbin/ifconfig/Makefile

Re: sfp module info and diagnostics

2019-04-08 Thread David Gwynne
this updates the ifconfig part of the diff it should have the following improvements: - actually applying to -current (thanks hrvoje) - use vis(3) when printing the strings out (thanks deraadt@) - make the code less special - use %.02f for the diag values consistently, and more sane units

sfp module info and diagnostics

2019-04-07 Thread David Gwynne
this adds support to ifconfig for reading info from transceivers. it looks like this: dlg@ix ifconfig$ sudo ./obj/ifconfig ix0 transceiver ix0: identifier SFP (03) connector: Copper Pigtail (21) vendor: Amphenol product: 616740001 revision: B serial: