[nagios-plugins] Just using the posix conform extended regular ...
Git Repository <[email protected]> Tue, 22 Oct 2013 13:50:06 +0200 (CEST)
| Newsgroups | gmane.network.nagios.plugins.cvs |
|---|---|
| Message-ID | <[email protected]> |
Module: nagios-plugins Branch: maint Commit: 3e2d2fcf1f9f53b62f3c08ddfcc0bc78ef1537f6 Author: Jan Wagner <[email protected]> Date: Tue Oct 22 10:42:22 2013 +0200 URL: https://www.nagios-plugins.org/repositories/nagios-plugins/commit/?id=3e2d2fc Just using the posix conform extended regular expression grep --- plugins-scripts/check_oracle.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins-scripts/check_oracle.sh b/plugins-scripts/check_oracle.sh index b86ce1d..77eba2e 100755 --- a/plugins-scripts/check_oracle.sh +++ b/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 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk