summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_oracle.sh
diff options
context:
space:
mode:
authorJan Wagner <waja@cyconet.org>2017-01-06 16:56:03 (GMT)
committerJan Wagner <waja@cyconet.org>2017-01-06 16:56:37 (GMT)
commit1204d7fe56c9f35af6500f5ddbae733a622fb63d (patch)
treeae0d0d8a3b4bb61d798b54a0be898a455b86c8f0 /plugins-scripts/check_oracle.sh
parent5f3232f00d07dac166b48acd6d0c92ec1ff64901 (diff)
downloadmonitoring-plugins-1204d7fe56c9f35af6500f5ddbae733a622fb63d.tar.gz
Fixing shellcheck SC2009
This requires pgrep from the procps package.
Diffstat (limited to 'plugins-scripts/check_oracle.sh')
-rwxr-xr-xplugins-scripts/check_oracle.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh
index 0e751f3..70a3fef 100755
--- a/plugins-scripts/check_oracle.sh
+++ b/plugins-scripts/check_oracle.sh
@@ -165,7 +165,7 @@ case "$cmd" in
165 }' 165 }'
166 ;; 166 ;;
167--db) 167--db)
168 pmonchk=$(ps -ef | grep -v grep | grep -E -c "(asm|ora)_pmon_${2}$") 168 pmonchk=$(pgrep -f "(asm|ora)_pmon_${2}$")
169 if [ "${pmonchk}" -ge 1 ] ; then 169 if [ "${pmonchk}" -ge 1 ] ; then
170 echo "${2} OK - ${pmonchk} PMON process(es) running" 170 echo "${2} OK - ${pmonchk} PMON process(es) running"
171 exit "$STATE_OK" 171 exit "$STATE_OK"