Skip to content
Snippets Groups Projects
Commit c708f1e2 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update php-fpm check - speed values in items per min instead of sec

parent e9d2d4d6
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,7 @@ The check fetches several counters from php-fm-status page.
It shows a short status in a single line and then the dump of the
status page.
For performance data it eachos:
For performance data it echos:
php-fpm-active count of active workers
php-fpm-maxactive max active processes (sum of idle + running + reading)
......@@ -82,8 +82,8 @@ For performance data it eachos:
php-fpm-reading count of workers in state "Reading headers"
php-fpm-queue count of items in the queue
php-fpm-maxqueue max listen queue
php-fpm-slow slow requests per second (since last execution of this check)
php-fpm-speed requests per second (since last execution of this check)
php-fpm-slow slow requests per minute (since last execution of this check)
php-fpm-speed requests per minute (since last execution of this check)
SYNTAX:
`basename $0` [-u URL]
......@@ -143,7 +143,7 @@ fi
# --- handled requests per sec
typeset -i iConn=$( _getvalue "accepted conn")
typeset -i iSpeed=$( ph.perfdeltaspeed "fpm-accepted" $iConn )
typeset -i iSpeed=$( ph.perfdeltaspeed "fpm-accepted" $iConn "min")
# --- count slots
typeset -i iActive=$( _getvalue "active processes" )
......@@ -154,7 +154,7 @@ typeset -i iIdle=$( _getvalue "idle processes")
typeset -i iQueue=$( _getvalue "listen queue len")
typeset -i iMaxQueue=$( _getvalue "max listen queue")
typeset -i iSlowTotal=$( _getvalue "slow requests")
typeset -i iSlow=$( ph.perfdeltaspeed "fpm-slow" $iSlowTotal )
typeset -i iSlow=$( ph.perfdeltaspeed "fpm-slow" $iSlowTotal "min" )
typeset -i iMaxChilds=$( _getvalue "max children reached")
......@@ -186,7 +186,7 @@ fi
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
ph.status "PHP-FPM: active: $iActive (max: $iMaxActive) .. idle workers: $iIdle .. queue: $iQueue (max: $iMaxQueue) .. speed: $iSpeed req per sec ... slow: $iSlow req per sec (total: $iSlowTotal)"
ph.status "PHP-FPM: active: $iActive (max: $iMaxActive) .. idle workers: $iIdle .. queue: $iQueue (max: $iMaxQueue) .. speed: $iSpeed req per min ... slow: $iSlow req per min (total: $iSlowTotal)"
echo Worker states: Running: $iWorkerRunning .. Reading headers: $iWorkerReading .. Idle: $iWorkerIdle
echo
hint="!! IMPORTANT !! Any non-OK status is still experimmental."
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment