cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Processes after system shutdown

jay_b2
Participant
0 Kudos

Hi

We have following processes running after shutting down sap instance with distributed installation (1 Central Instance + One database)

root  9109610        1   0   Jan 11      -  0:04 /usr/sap/hostctrl/exe/saphostexec pf=/usr/sap/hostctrl/exe/host_profile 
  sapadm  9240678        1   0   Jan 11      -  0:28 /usr/sap/hostctrl/exe/sapstartsrv pf=/usr/sap/hostctrl/exe/host_profile -D 
    root  9764916        1   0   Jan 11      -  0:23 /usr/sap/hostctrl/exe/saposcol -l -w60 pf=/usr/sap/hostctrl/exe/host_profile 
  <sapsid>adm  9830494        1   1   Jan 12      -  0:45 /usr/sap/<SAPSID>/J00/exe/sapstartsrv pf=/usr/sap/<SAPSID>/SYS/profile/<SAPSID>_J00_<HOSTNAME> -D -u <sapsid>adm 
  <diagsid>adm 10027180        1   0   Jan 14      -  0:01 /usr/sap/<DIAGSID>/SMDA97/exe/sapstartsrv pf=/usr/sap/<DIAGSID>/SYS/profile/<DIAGSID>_SMDA97_<HOSTNAME> -D -u <diagsid>adm 
  <diagsid>adm 10092686 10223810   0   Jan 14      -  2:53 /usr/sap/<DIAGSID>/SMDA97/exe/jstart -appTrc -nodeId=0 pf=/usr/sap/<DIAGSID>/SYS/profile/<DIAGSID>_SMDA97_<HOSTNAME> -hostvm -nodeName=smdagent -file=/usr/sap/<DIAGSID>/SMDA97/SMDAgent/smdagent.properties -jvmFile=/usr/sap/<DIAGSID>/SMDA97/work/jstart.jvm -traceFile=/usr/sap/<DIAGSID>/SMDA97/work/dev_smdagent -javaOutFile=/usr/sap/<DIAGSID>/SMDA97/work/jvm_smdagent.out 
  <diagsid>adm 10223810 10616894   0   Jan 14      -  0:00 jc.sap<DIAGSID>_SMDA97 pf=/usr/sap/<DIAGSID>/SYS/profile/<DIAGSID>_SMDA97_<HOSTNAME> 
  <diagsid>adm 10616894        1   0   Jan 14      -  0:00 sapstart pf=/usr/sap/<DIAGSID>/SYS/profile/<DIAGSID>_SMDA97_<HOSTNAME>

Can someone help to find why there are so many processes esp sapstart , jstart, sapstartsrv for diag agent and instance? Do we need to stop each of these processes every time we shut down the instance ? and start them again manually ?

Thanks,

Accepted Solutions (0)

Answers (5)

Answers (5)

0 Kudos

Hi,

all of these programs that you cannot stop with the stopsap are started with the sapinit script that is started as root during the start up of the Operating System.

So, if you want to stop these process you should stop the sapinit, for example in a lunux system:

/etc/init.d/sapinit stop

after this you do find that no others sap process still running.

If you want to start the SAP again you have to start the sapinit again.

/etc/init.d/sapinit start

You have to manage the sapinit script as root user.

Cheers,

Clébio

Former Member
0 Kudos

Hi Jay,

SAPOSCOL and SAPSTARTSVR are independient process. For shutdown saposcol execute commando saposcol -k.

The other process are Solution Manager Diagnostics Agent


 <sapsid>adm  9830494        1   1   Jan 12      -  0:45 /usr/sap/<SAPSID>/J00/exe/sapstartsrv pf=/usr/sap/<SAPSID>/SYS/profile/<SAPSID>_J00_<HOSTNAME> -D -u <sapsid>adm 
  <diagsid>adm 10027180        1   0   Jan 14      -  0:01 /usr/sap/<DIAGSID>/SMDA97/exe/sapstartsrv pf=/usr/sap/<DIAGSID>/SYS/profile/<DIAGSID>_SMDA97_<HOSTNAME> -D -u <diagsid>adm 
  <diagsid>adm 10092686 10223810   0   Jan 14      -  2:53 /usr/sap/<DIAGSID>/SMDA97/exe/jstart -appTrc -nodeId=0 pf=/usr/sap/<DIAGSID>/SYS/profile/<DIAGSID>_SMDA97_<HOSTNAME> -hostvm -nodeName=smdagent -file=/usr/sap/<DIAGSID>/SMDA97/SMDAgent/smdagent.properties -jvmFile=/usr/sap/<DIAGSID>/SMDA97/work/jstart.jvm -traceFile=/usr/sap/<DIAGSID>/SMDA97/work/dev_smdagent -javaOutFile=/usr/sap/<DIAGSID>/SMDA97/work/jvm_smdagent.out 
  <diagsid>adm 10223810 10616894   0   Jan 14      -  0:00 jc.sap<DIAGSID>_SMDA97 pf=/usr/sap/<DIAGSID>/SYS/profile/<DIAGSID>_SMDA97_<HOSTNAME> 
  <diagsid>adm 10616894        1   0   Jan 14      -  0:00 sapstart pf=/usr/sap/<DIAGSID>/SYS/profile/<DIAGSID>_SMDA97_<HOSTNAME>

You can stop there processes, log on in your system with user SMDADM or DDAADM (according to your version)

Then stop SMD Agent with follow command:

./smdstop.sh 97

Best Regards,

William Neira

Former Member
0 Kudos

Hi Jay,

Yes,you need to stop them manually if you see these process active after stopping the SAP instance.

Kill only process which are relevant to the Instance you have stopped.

After that cleanup the shared memory too,for complete STOP and to insure issues wont occur while starting SAP Instance.

1. bring down saposcol w/ the "saposcol -k" command

2. The command to clear shared memory segments is actually "cleanipc nn

remove" (where nn is the instance number)

3. After this command, do a "ipcs |grep <SID>adm" to verify that no more

shared memory segments are owned by <SID>adm

4. if above "ipcs" command does show any entries

a) "ps -ef|grep <SID>adm" to which processes are still running

b) stop/kill any processes

c) "ipcrm -m<nnn> -m<nnn> -s<nnn> -s<nnn>" where nnn is the

number returned by the ipcs command

for example: ipcs | grep <sid>adm | more

m 315419 0x00000000 rw-r---

While startign the SAP Instance you dont have to start all these manually.

Regards,

Ashutosh

Former Member
0 Kudos

Hi Jay,

It depends on the type of maintenance activity that you have been performing. If you have made JVM parameter change then just recycling the Java instance would be suffice and you no need to bother about the SMD agent and SAPOSCOL process.

However if you are going to apply the OS patch and all your Apps/DB needs to be down for that activity, then yes you should bring down your saposcol, SMD agent and sapstart processes running on the system.

To bring down your SMD agent, just sudo to your <smd>adm user id and from there issue stopsap all. Please see the owner of the process and path where it is running that will give you an idea of how you need to stop it. Ideally stopsap all with <smd>adm will work.

To stop saposcol, you can issue saposcol -k

To kill the sapstart* processes issue kill -9 process ID. when you issue start sap next time all these processes will strat automatically. You need to restart the SMD agent separately along with your other SAP instance that is running on your host after the maintenance window. Also validate that your saposcol has been started by issuing saposcol -s

Best Regards,

Vasanth G

Former Member
0 Kudos

Hello

Yes you need kill them manually. After you shutdown the system, check for the active processes

ps -ef | grep -i sap

Then kill -9 <pid> with ower as <sid>adm

Then cleanipc <instance number> remove, repeat for all the instances

or

use

ipcs -a | grep -i sap

output for eg.:

s 6291605 0x002dedcc ra-r--- <sid>adm sapsys re0adm sapsys 1 11:38:27 17:13:05

s 6291606 0x002ded83 ra-r--- <sid>adm sapsys re0adm sapsys 1 11:38:27 17:13:05

s 6291607 0x00004e53 ra-r--- <sid>adm sapsys re0adm sapsys 1 17:13:12 17:13:07

then give ipcrm -s 6291605 , repeat the same for all the pid with owner as <sid>adm.

Thanks & regards

bala

Former Member
0 Kudos

Hello,

I see two instances configured on this host. Once is J00 and other one is SMD.

When you issue stopsap against J00 instance, only J00 instance related processes will be stopped except saphostexec, sapstartsrv and saposcol. You have to manually kill or stop these processes.

Since SMD won't be effected by above stopsap command issued for J00 instance, you are seeing SMD instance related processes as well.

Hope it answered your query.

Thanks,

Siva Kumar

Former Member
0 Kudos

Hello Jay,

The processes that showing in the list are SMD agent and saposcol. It will not shutdown along with STOPSAP, you have to manually stop the OSCOL and SMD agent as SAP, OSCOL and SMD Agent are three independent process.

SAPOSCOL - The operating system collector SAPOSCOL is a stand-alone program that runs in the operating system background. It runs independently of SAP instances exactly once per monitored host. SAPOSCOL collects data about operating system resources

SMD Agent - Reports system performance and monitoring to SOLMAN.

Regards,

Arjun