cancel
Showing results for 
Search instead for 
Did you mean: 

saproot.sh script not running

Former Member
0 Kudos

Hi All

1)I upgraded kernel 700 to patch 185.its solaris machine.and then i tried to run saproot.sh script,but it is saying like

  1. ./saproot.sh SID

./saproot.sh: whoami: not found

./saproot.sh: test: argument expected

i gave full permission to saproot.sh and saposcol

2)I run a command 'cleanipc 00 remove' from then it is giving dump 'PXA_NO_SHARED_MEMORY'

i increased buffersize also but of no use.

when i go to st06 it is giving err 'SAPOSCOL not running?(shared memory not available)'

manually itried to run saposcol but it is saying no shared memory.

appreciate the responses.

Thank you

Accepted Solutions (1)

Accepted Solutions (1)

markus_doehr2
Active Contributor
0 Kudos

> # ./saproot.sh SID

> ./saproot.sh: whoami: not found

> ./saproot.sh: test: argument expected

There are two problems with that script delivered by SAP default:

- whoami is in /usr/ucb which should not be in the path (it contains old SunOS 4.x tools)

- "argument expected" means, that the shell (as root usually /bin/sh) does syntactically not understand the script.

You can simply do

ksh ./saproot.sh <SID>

or

bash ./saproot.sh <SID>

The "whoami" error still coming can be ignored since it just checks if you're logged on as root (which you are).

Markus

Former Member
0 Kudos

Hi Markus

i run the script and i am getting this

  1. ksh ./saproot.sh CR1

./saproot.sh[122]: whoami: not found

./saproot.sh[122]: test: argument expected

Preparing saposcol ...

Preparing icmbnd ...

done

and when i go to st06 it is saying that 'SAPOSCOL not running?shared memory not available'

markus_doehr2
Active Contributor
0 Kudos

> and when i go to st06 it is saying that 'SAPOSCOL not running?shared memory not available'

Yes - that is expected.

The script saproot.sh does the following:

- it checks the user ID (it tries to use whoami)

- it checks if saposcol is running

- if saposcol is running it stops it

- it does a "chown root saposcol icmbnd" (if you use oracle it will also change owners of some br*tools)

- it does a "chmod 4755 saposcol icmbnd" (it sets the sticky bit so that the effective user is root)

It does not start saposcol. This is done by "startsap" (when you start the system). You can now do simply

saposcol -l

wait a few seconds and then start ST06 again.

Markus

Former Member
0 Kudos

i tried to start saposcol

BGLR-CRM01:cr1adm> saposcol -l

-l

open logfile '/usr/sap/tmp/dev_coll.tmp' failed... use stderri

22:55:52 15.05.2009 ERROR: cannot open log file /usr/sap/tmp/dev_coll.tmp

22:55:52 15.05.2009 ERROR: Make sure directory /usr/sap/tmp exists or specify D

IR_PERF

22:55:52 15.05.2009 ERROR: in profile and run saposcol pf=<profile>

it is giving this and i go to st06 --> goto --> operating system collector --> start.

but it is giving same error 'SAPOSCOL not running?shared memory not available'

markus_doehr2
Active Contributor
0 Kudos

What is the output of

cd /usr/sap/<SID>/exe
ls -l saposcol

It seems, that the script did not change permissions correctly...

Markus

Former Member
0 Kudos

Hi Markus

these are the permissions saposcol have

-rwsr-xr-x 1 cr1adm sapsys 2083576 Nov 19 01:26 saposcol

markus_doehr2
Active Contributor
0 Kudos

Try the following as user root:

cd /usr/sap/<SID>/exe
chown root saposcol icmbnd
chmod 4755 saposcol icmbnd

then switch to <sid>adm and execute

saposcol -l

again.

Markus

Former Member
0 Kudos

Markus

here is the reply

BGLR-CRM01:cr1adm> saposcol -l

-l

23:16:57 15.05.2009 LOG: Effective User Id is root

******************************************************************************

  • This is Saposcol Version COLL 20.95 700 - V3.72 64Bit

  • Usage: saposcol -l: Start OS Collector

  • saposcol -k: Stop OS Collector

  • saposcol -d: OS Collector Dialog Mode

  • saposcol -s: OS Collector Status

  • Starting collector (create new process)

markus_doehr2
Active Contributor
0 Kudos

Looks good now! And now you should be able to see the data in ST06.

Markus

Former Member
0 Kudos

Yes markus its working good now

Really Thank you very much man.

and can you look into my second issue

it is giving dump'PXA_NO_SHARED_MEMORY'

i increased buffer size also but not solved

Edited by: Santosh Kulkarni on May 15, 2009 12:25 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You need to run the script

./saproot.sh <SAPSID>

In place of <SAPSID> put your system ID name (consist of 3 characters).

Thanks,

Rohan

Former Member
0 Kudos

Hi Rohanravindra

i already done that in my post you find that

and i logged in as root user only.

see my post

  1. ./saproot.sh SID

./saproot.sh: whoami: not found

./saproot.sh: test: argument expected

Edited by: Santosh Kulkarni on May 14, 2009 8:36 AM

debasissahoo
Active Contributor
0 Kudos

Santhosh,

Did you follow whats Note 420417 says?

Regards,

Debasis.

Former Member
0 Kudos

Hi Debasis

i gone through the note but i am not so clear about that

can you explain me in detail.

i edited saproot.sh but i didn't find 'if [ `whoami` != root ];then'

Edited by: Santosh Kulkarni on May 14, 2009 9:00 AM

Former Member
0 Kudos

Santosh, did you try setting up the PATH environment variable as per the note?

Former Member
0 Kudos

Hi Manoj

I tried alternative solution provided in the note

' edit the saproot.sh script; replacing the line

if [ `whoami` != root ];then

with the following:

if [ `/usr/xpg4/bin/id -un` != root ];then '

i tried this but i didn't get " if [ `whoami` != root ];then " in saproot.sh

debasissahoo
Active Contributor
0 Kudos

Hi Santosh,

Try the first solution, and let us know whats the output.

e.g if using bourne shell,

#bsh

#PATH=/usr/ucb:$PATH

#./saproot.sh <SID>

Regards,

Debasis.

Former Member
0 Kudos

Hi Debasis

i am not getting that point exactly.

can u explain me in detail.

we are using korn shell

PATH=/usr/ucb:$PATH

./saproot.sh <SID>

i am not getting here what exactly is the PATH

former_member185031
Active Contributor
0 Kudos

>

> Hi All

>

> 1)I upgraded kernel 700 to patch 185.its solaris machine.and then i tried to run saproot.sh script,but it is saying like

>

> # ./saproot.sh SID

> ./saproot.sh: whoami: not found

> ./saproot.sh: test: argument expected

>

./saproot.sh SID needs to be execute from root user

> i gave full permission to saproot.sh and saposcol

>

> 2)I run a command 'cleanipc 00 remove' from then it is giving dump 'PXA_NO_SHARED_MEMORY'

> i increased buffersize also but of no use.

> when i go to st06 it is giving err 'SAPOSCOL not running?(shared memory not available)'

> manually itried to run saposcol but it is saying no shared memory.

>

> appreciate the responses.

>

> Thank you

Check this link

http://help.sap.com/saphelp_bw30b/helpdata/en/95/df4002597211d3b473006094b910d9/content.htm

http://www.saptechies.com/os-collector-saposcol/

Regards,

Subhash

Former Member
0 Kudos

Hi Subhash

I already gone through the links

but it doesn't solve my issue

any more please

Former Member
0 Kudos

Hello Santosh

Follow the steps below:

Logon as user root

cd /usr/sap/<SAPSID>/SYS/exe/run

./saproot.sh <SAPSID>

This should help

Rohit

Former Member
0 Kudos

Hi Rohith

i already run that script with root user only.

and i executed it in exe/run directory only

i tried all these but no result

any more ideas

debasissahoo
Active Contributor
0 Kudos

Santosh,

You should follow,

Note 420417 - saproot.sh 'whoami command not found' (Solaris)

https://service.sap.com/sap/support/notes/420417

Regards,

Debasis.