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

check_sapstartsrv of sap_facts.sh could return wrong results #20

Open
RonnyFiebigDVTS opened this issue Nov 8, 2023 · 0 comments
Open

Comments

@RonnyFiebigDVTS
Copy link

Background

If an instancenumber is any given number below 60 and the sapstartsrv is restarted in the last hour the function check_sapstartsrv could return wrong values because part of the grep command could address the runtime instead of the instancenumber of the SAP SID

Problem in file sap_facts.sh in function check_sapstartsrv on line 289

Solution

Change:

SAPSTARTSRV=$(ps -ef | grep $2 | grep $3 | grep sapstartsrv | wc -l)

To:

SAPSTARTSRV=$(ps -eo cmd | grep $2 | grep $3 | grep sapstartsrv | wc -l)

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

No branches or pull requests

1 participant