فهرست منبع

check_oracle: make sure pgrep is getting the count

madlohe 6 سال پیش
والد
کامیت
48221594c1
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      plugins-scripts/check_oracle.sh

+ 1 - 1
plugins-scripts/check_oracle.sh

@@ -166,7 +166,7 @@ case "$cmd" in
     }'
     ;;
 --db)
-    pmonchk=$(pgrep -f "(asm|ora|xe)_pmon_${2}$")
+    pmonchk=$(pgrep -f -c "(asm|ora|xe)_pmon_${2}$")
     if [ "${pmonchk}" -ge 1 ] ; then
         echo "${2} OK - ${pmonchk} PMON process(es) running"
         exit "$STATE_OK"