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.5K All Categories
 6 XORMON NG
 24 XORMON
 122 LPAR2RRD
 9 VMware
 12 IBM i
 1 oVirt / RHV
 4 MS Windows and HyperV
 Solaris / OracleVM
 XenServer / Citrix
 Nutanix
 6 Database
 1 Cloud
 9 Kubernetes / OpenShift / Docker
 101 STOR2RRD
 14 SAN
 6 LAN
 15 IBM
 3 EMC
 10 Hitachi
 5 NetApp
 13 HPE
 Lenovo
 1 Huawei
 1 Dell
 Fujitsu
 2 DataCore
 INFINIDAT
 3 Pure Storage
 Oracle