Explorar o código

Just using the posix conform extended regular expression grep

Jan Wagner %!s(int64=12) %!d(string=hai) anos
pai
achega
3e2d2fcf1f
Modificáronse 1 ficheiros con 1 adicións e 2 borrados
  1. 1 2
      plugins-scripts/check_oracle.sh

+ 1 - 2
plugins-scripts/check_oracle.sh

@@ -163,8 +163,7 @@ case "$cmd" in
     }'
     ;;
 --db)
-    pmonchk=`ps -ef | grep -v grep | grep -c "ora_pmon_${2}$"`
-    pmonchk=$(($pmonchk+`ps -ef | grep -v grep | grep -c "asm_pmon_${2}$"`))
+    pmonchk=`ps -ef | grep -v grep | grep -E -c "(asm|ora)_pmon_${2}$"`
     if [ ${pmonchk} -ge 1 ] ; then
 	echo "${2} OK - ${pmonchk} PMON process(es) running"
 	exit $STATE_OK