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

update php-fpm check - smal changes in output

parent 557eb335
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,7 @@
tmpfile=/tmp/check_fpm_processes_1
defaulturl=localhost/status
sDeltaunit="s"
sDeltaunit="min"
# ----------------------------------------------------------------------
# functions
......@@ -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
It shows a short service status in a single line and then the dump of the
status page.
For performance data it echos:
......@@ -158,6 +158,7 @@ typeset -i iMaxQueue=$( _getvalue "max listen queue")
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=$iSpeed*100/$iSlow
typeset -i iWorkerRunning=$( _getWorkerOfState "Running" | wc -l )
......@@ -188,9 +189,15 @@ fi
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
ph.status "PHP-FPM: active: $iActive (max: $iMaxActive) .. idle workers: $iIdle .. queue: $iQueue (max: $iMaxQueue) .. speed: $iSpeed req per $sDeltaunit ... slow: $iSlow req per $sDeltaunit (total: $iSlowTotal)"
echo Worker states: Running: $iWorkerRunning .. Reading headers: $iWorkerReading .. Idle: $iWorkerIdle
ph.status "PHP-FPM service: active: $iActive (max: $iMaxActive) .. idle workers: $iIdle .. queue: $iQueue .. speed: $iSpeed req per $sDeltaunit ... slow: $iSlow req per $sDeltaunit ($iSlowPercent %; total: $iSlowTotal)"
echo "Workers: Running: $iWorkerRunning"
echo " Reading headers: $iWorkerReading"
echo " Idle: $iWorkerIdle"
echo
echo " Waiting for a worker (queue): $iQueue (max: $iMaxQueue)"
echo
# ----- output hints on warning level
hint="!! IMPORTANT !! Any non-OK status is still experimmental."
if [ $iWorkerIdle -eq 0 ]; then
echo $hint
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment