1829067 Members
2452 Online
109986 Solutions
New Discussion

psgrep not found

 
SOLVED
Go to solution
Mary Ann Lipa
Valued Contributor

psgrep not found

hi,
i am having problems with my cluster's config.
it says:
psgrep: not found
i checked customer.functions and the psgrep line seems OK..
i also looked for psgrep but i cant find it anywhere.
trying to work it with MCSG A.11.13 and SAP

please help...
thanks
Which is worse, smoking or picking your nose in a public place?
8 REPLIES 8
melvyn burnard
Honored Contributor

Re: psgrep not found

which version of the SGeSAP toolkit are you using to create your SAP package?
I am not aware of a psgrep command
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Massimo Bianchi
Honored Contributor

Re: psgrep not found

Neither i know of a "psgrep" command.

It may be an alias...

try issuing, from shell

alias | grep ps

and see.

Massimo
Ralph Grothe
Honored Contributor

Re: psgrep not found

Not knowing anything about SAP peculiarities, I simply would assume that psgrep is nothing more than an alias or a shell func definition by the user account that runs the SAP instance.
I further would assume that this alias or like is already defined in some (shell specific) dotfile in the sap user's $HOME.
Probably your package control script just needs to source this dotfile?
Madness, thy name is system administration
Mary Ann Lipa
Valued Contributor

Re: psgrep not found

thanks. i'll consult my sap guy.
Which is worse, smoking or picking your nose in a public place?
Ralph Grothe
Honored Contributor

Re: psgrep not found

Ah, found it.

I remembered we had a box that runs SAP.

Thereon I did this:


# swlist|grep -i sap
B7885BA B.03.07 MC/Service Guard Extension for SAP
PHSS_28733 1.0 OV DP5.00 patch - SAP packet
# swlist -l file B7885BA
# Initializing...
# Contacting target "warnow"...
#
# Target: warnow:/
#

# B7885BA B.03.07 MC/Service Guard Extension for SAP
# B7885BA.SG-Ext-SAP-R3 B.03.07 MC/ServiceGuard Extension for SAP
# B7885BA.SG-Ext-SAP-R3.SG-SAP-COR B.03.07 Core MC/SG SAP R/3 Integration Files
/opt/cmcluster
/opt/cmcluster/sap
/opt/cmcluster/sap/CCmon
/opt/cmcluster/sap/CCmon/Readme_CCmon
/opt/cmcluster/sap/CCmon/Setup_CCmon
/opt/cmcluster/sap/CCmon/ccmon.tar
/opt/cmcluster/sap/SID
/opt/cmcluster/sap/SID/customer.csh
/opt/cmcluster/sap/SID/customer.sh
/opt/cmcluster/sap/SID/sap.conf
/opt/cmcluster/sap/SID/sapap.cntl
/opt/cmcluster/sap/SID/sapci.cntl
/opt/cmcluster/sap/SID/sapdb.cntl
/opt/cmcluster/sap/SID/sapdbci.cntl
/opt/cmcluster/sap/SID/saplc.cntl
/opt/cmcluster/sap/SID/saplc.mon
/opt/cmcluster/sap/SID/startdb.sql
/opt/cmcluster/sap/customer.functions
/opt/cmcluster/sap/sap.functions

# grep -l psgrep $(swlist -l file B7885BA|grep /opt)
/opt/cmcluster/sap/customer.functions
/opt/cmcluster/sap/sap.functions

# grep alias\ psgrep /opt/cmcluster/sap/sap.functions
alias psgrep='ps -ef | grep -v grep'

There we got the culprit.
I think you must provide your customer_defined_cm{run|halt}_commands()
somehow with an invocation (probably sourcing) of this sap.functions file.
Madness, thy name is system administration
Mary Ann Lipa
Valued Contributor

Re: psgrep not found

Thanks Ralph..
got it now....
its just an alias..
Which is worse, smoking or picking your nose in a public place?
Ralph Grothe
Honored Contributor

Re: psgrep not found

Mary Ann,

don't know if the basic SAP file layout is the same on most HP-UX boxes.

However I found on our's in one of the SG packages' directories this sapdbci.cntl file lingering.

Therein is a variable assignment that gives the path to the sap.functions.
Maybe this one is lacking in your installation?

# grep ^FUNC_FILE /etc/cmcluster/Z01/sapdbci.cntl
FUNC_FILE=${FUNC_FILE:-/etc/cmcluster/sap.functions}
Madness, thy name is system administration
melvyn burnard
Honored Contributor
Solution

Re: psgrep not found

It looks like this function was in the older versions of the SGeSAp Toolkkit, as it is no longer in the newer versions that I have.
You should find in the /opt/cmcluster/sap/sap.functions file that there is a line:
alias psgrep=`ps -ef | grep -v grep`
All this is doing is enabling later grep command lines to be shortened in htese scripts.
This is definitley in the B.03.06 release.
As I say, this no longer seem to appear in the later SGeSAP toolkit releases.
Checking my B.03.07 it is still htere, but in hte newer B.03.08 it is no longer there.
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!