diff --git a/check_php-fpm-status b/check_php-fpm-status index 7d23bb5e5179afbc21fdba6cefe6976040ab3ca8..93032b822e6706b7f879d7a5dfa4faca52548d2f 100755 --- a/check_php-fpm-status +++ b/check_php-fpm-status @@ -12,6 +12,7 @@ # 2022-02-11 v0.5 <axel.hahn@iml.unibe.ch> show running workers in 1st line # 2022-04-01 v0.6 <axel.hahn@iml.unibe.ch> use wget default params; shell fixes # 2022-05-09 v0.7 <axel.hahn@iml.unibe.ch> use wget default params +# 2022-07-08 v0.8 <axel.hahn@iml.unibe.ch> eliminate division by 0 # ====================================================================== . $(dirname $0)/inc_pluginfunctions @@ -166,7 +167,8 @@ typeset -i iSlowTotal=$( _getvalue "slow requests") typeset -i iSlow=$( ph.perfdeltaspeed "fpm-slow" $iSlowTotal $sDeltaunit ) typeset -i iMaxChilds=$( _getvalue "max children reached") -typeset -i iSlowPercent=$iSlow*100/$iSpeed +typeset -i iSlowPercent=0 +test $iSpeed -gt 0 && iSlowPercent=$iSlow*100/$iSpeed typeset -i iWorkerRunning=$( _getWorkerOfState "Running" | wc -l )