Skip to content

check_sapstartsrv of sap_facts.sh could return wrong results #20

@RonnyFiebigDVTS

Description

@RonnyFiebigDVTS

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions