Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Medium: oracle: oracledb.sh always executes a forced stop #434

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

ioggstream
Copy link

exit_idle() ps |grep if all oracle processes are correctly stopped.

expected behavior:

  • ps | grep should return 0 if oracle is not stopped, 1 if stopped

actual behavior:

  • ps | grep always return 0, even if no oracle processes linger around. So stopping an oracle instance always takes at least 90 seconds

This is because there's an ps | grep | awk; but awk always return 0 even if it prints no output.

A simpler (but logically different) solution could be to just remove the awk...your choiche!

Peace,
R.

@ioggstream ioggstream changed the title script doesn't recognize when oracle processes are correctly stopped: stop always lasts more than 90 seconds Medium: oracle: oracledb.sh always executes a forced stop May 27, 2014
@davidvossel
Copy link
Contributor

I address this issue in this pull request. My patch is slightly different. I used, | grep -q "."

#438

@ioggstream
Copy link
Author

2014-05-30 22:48 GMT+02:00 David Vossel notifications@github.com:

I address this issue in this pull request. My patch is slightly different.
I used, | grep -q "."

#438 #438

Ok. I think the best approach is to rewrite the whole thing without awk.

Using pgrep could even make things clear

eg. something like the following will suffice.

#pgrep -f "$LSNR_PROCNAME .* $ORACLE_SID"

Peace,
R.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants