wrong SFP power calculation formula used on IBM SVC/FlashSystem

edited December 2022 in IBM

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:



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)




  • 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 )


    replace the line

    SVC.pm: return ( sprintf( "%.3f", 10 * log( $pwr / 1000 ) ) );


    SVC.pm: return ( sprintf( "%.3f", 10 * log( $pwr / 1000 ) / log(10) ) );

  • this will be included into coming v7.60 in 2 weeks.

Sign In or Register to comment.