From bd92d4b4f99a9ba0e4ef6f16381b7dc4bba9ccd8 Mon Sep 17 00:00:00 2001 From: Ramil Valitov Date: Fri, 7 Aug 2020 18:50:37 +0300 Subject: [PATCH] [add] analyze pools in parallel --- zabbix/zabbix_php_fpm_discovery.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zabbix/zabbix_php_fpm_discovery.sh b/zabbix/zabbix_php_fpm_discovery.sh index 476fe15..5a59f21 100644 --- a/zabbix/zabbix_php_fpm_discovery.sh +++ b/zabbix/zabbix_php_fpm_discovery.sh @@ -717,8 +717,9 @@ POOL_NAMES_LIST=$(${S_PRINTF} '%s\n' "${PS_LIST[@]}" | $S_AWK '{print $NF}' | $S #Update pending list with pools that are active and running while IFS= read -r POOL_NAME; do - AnalyzePool "$POOL_NAME" + AnalyzePool "$POOL_NAME" & done <<<"$POOL_NAMES_LIST" +wait if [[ -n $DEBUG_MODE ]]; then PrintDebug "Pending list generated:"