#################### ### Apache HTTPD ### #################### # get data from mod_status # $1 - Variable name UserParameter=apache.server-status[*],data=$(wget --no-check-certificate http://localhost/server-status?auto -O - -q --timeout=3 -t 1 | grep ^"$1:" | awk '{print $NF}') ; [ "$data" == "" ] && data=0 ; echo $data | sed 's/^\./0./' # count a scoreboard status from mod_status # $1 : # "_" Waiting for Connection # "S" Starting up # "R" Reading Request # "W" Sending Reply # "K" Keepalive (read) # "D" DNS Lookup # "C" Closing connection # "L" Logging # "G" Gracefully finishing, # "I" Idle cleanup of worker # "." Open slot with no current process UserParameter=apache.scoreboard[*],wget --no-check-certificate http://localhost/server-status?auto -O - -q --timeout=3 -t 1 | grep ^Scoreboard: | awk '{print $NF}' | grep -o '\'$1 | wc -l