Hello. I need to convert an SFP DDM signal from mW to dBm. This requires the following formula:
10*log10(mW)=dBm
A simple comparison using if works, but puts a load on the switch, and works intermittently if used for all ports.
Another idea, not simple… but you can create an array with the dBm values inside, then use use array_element with the mW (or some multiple of mW) to fetch the pre-converted dBm value. Essentially a lookup table, using array()/array_element()functions.
I decided to do it a little differently. With Raspberry (Orange Pi).
If I use it as a probe, everything is ok, no problems. But if I add it to the link label, Dude sends 324 requests/port per each update!!!.
?!?!?!
I have 1 switch x8 ports and 5 switches x24 ports.