3
0
mirror of https://github.com/rvalitov/zabbix-php-fpm.git synced 2023-11-05 03:30:27 +01:00

[fix] get port number, not name (#26)

This commit is contained in:
Ramil Valitov 2020-02-07 13:08:15 +01:00 committed by GitHub
parent 0400614376
commit 2192bc31ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,7 +237,8 @@ while IFS= read -r line; do
PrintDebug "Started analysis of pool $line, PID $POOL_PID" PrintDebug "Started analysis of pool $line, PID $POOL_PID"
#Extract only important information: #Extract only important information:
POOL_PARAMS_LIST=$($S_LSOF -p "$POOL_PID" 2>/dev/null | $S_GREP -w -e "unix" -e "TCP") #Use -P to show port number instead of port name, see https://github.com/rvalitov/zabbix-php-fpm/issues/24
POOL_PARAMS_LIST=$($S_LSOF -P -p "$POOL_PID" 2>/dev/null | $S_GREP -w -e "unix" -e "TCP")
FOUND_POOL="" FOUND_POOL=""
while IFS= read -r pool; do while IFS= read -r pool; do
if [[ -n $pool ]]; then if [[ -n $pool ]]; then