wrong SFP power calculation formula used on IBM SVC/FlashSystem
Hello Support Team,
please have your developers check the formula that calculates the SFP Power in db from the Watt number in stor2rrd. There is a mistake.
For Example , if the power is 466uW , you are using the formula:
10*ln(466/1000) = 7.64dBm.
when it should be:
10*log(466/1000) = 3.3dBm.
which means you are using "ln" instead of "log" . On the Brocade Switches, stor2rrd is using the correct logarithm, but IBM SVC/Storwize/FlashSystem seems to use "ln" instead of "log". The result is that the number is 2.3 times larger.
thanks a lot and happy new year.
PS: This is what I found on the internet on how it should be:
Quote:
Units of measurement
As seen in the brocade sfpshow output, the light level is represented in dBm and uW.
Decibels (dB) is the ratio of output power to input power, expressed as 10*log (power ratio).
dBm = power in decibels relative to 1mW (1000uW). A reading of 0 dBm is 1mW.
If the power reading is plus (+) dBm the power is >1mW, minus () is <1mW.
For example, in the Brocade sfpshow output above, 466uW is 10*log(466/1000) = 3.3dBm.
Also displayed is the light power in uW.
uW = micro Watts which is the actual measure of the light power (not a ratio)
Comments

I see this in the code for Storwize/SVC:
return ( sprintf( "%.3f", 10 * log( $pwr / 1000 ) ) );
It looks correct.

turns out pearl's log() function is mathematically actually natural logarythm ( =ln )
Solution:
replace the line
SVC.pm: return ( sprintf( "%.3f", 10 * log( $pwr / 1000 ) ) );
with
SVC.pm: return ( sprintf( "%.3f", 10 * log( $pwr / 1000 ) / log(10) ) );

this will be included into coming v7.60 in 2 weeks.
Howdy, Stranger!
Categories
 1.4K All Categories
 6 XORMON
 68 LPAR2RRD
 5 VMware
 3 IBM i
 oVirt / RHV
 3 MS Windows and HyperV
 Solaris / OracleVM
 XenServer / Citrix
 Nutanix
 3 Database
 1 Cloud
 6 Kubernetes / OpenShift / Docker
 51 STOR2RRD
 8 SAN
 2 LAN
 7 IBM
 1 EMC
 5 Hitachi
 4 NetApp
 5 HPE
 Lenovo
 1 Huawei
 1 Dell
 Fujitsu
 DataCore
 INFINIDAT
 2 Pure Storage
 Oracle