Skip to Content

multiple instances' sapstartsrv processes

Hello,

After restarting SAP I regularly have multiple sapstartsrv for a single instance running:

# ps -ef | grep -i /usr/sap/SID/DVEBMGS00/exe/sapstartsrv | grep -v grep
sidadm   12959     1  0 Jun10 ?        00:02:10 /usr/sap/SID/DVEBMGS00/exe/sapstartsrv pf=/usr/sap/SID/SYS/profile/START_DVEBMGS00_host -D
sidadm   39648     1  0 Jun21 ?        00:00:05 /usr/sap/SID/DVEBMGS00/exe/sapstartsrv pf=/usr/sap/SID/SYS/profile/START_DVEBMGS00_host -D

1. Is it a bug or a classical behaviour?

2. What are the consequences of having these duplicated processes?

Basically should I care about it?

Thanks in advance for your answer.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Best Answer
    Jun 23, 2014 at 09:18 AM

    Hello,

    BTW, I have learned that tmpwatch is activated by default on Redhat.

    It cleans /tmp after 10d from wht I see:

    # cat /etc/cron.daily/tmpwatch
    #! /bin/sh
    flags=-umc
    /usr/sbin/tmpwatch "$flags" -x /tmp/.X11-unix -x /tmp/.XIM-unix \
        -x /tmp/.font-unix -x /tmp/.ICE-unix -x /tmp/.Test-unix \
        -X '/tmp/hsperfdata_*' 10d /tmp
    /usr/sbin/tmpwatch "$flags" 30d /var/tmp
    for d in /var/{cache/man,catman}/{cat?,X11R6/cat?,local/cat?}; do
        if [ -d "$d" ]; then
        /usr/sbin/tmpwatch "$flags" -f 30d "$d"
        fi
    done

    I guess this is the root cause of my duplicated process.

    For the one that use Redhat, do you deactivate tmpwatch by commenting the lines in etc/cron.daily/tmpwatch?

    Regards,

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Schmid,

      I am not sure what all other files can be deleted or not. All I can tell you is the application which generated the files in /tmp directory should be using this directory is a temporary storage of short lived files. Till that application is UP and running, these files should bot be removed. And yes, once the system is not running, these files should not exists.

      Regards,

      Divyanshu

  • avatar image
    Former Member
    Jun 23, 2014 at 06:23 AM

    I see in your ps -ef, one process is active since 10 June and another one from 21 june.

    Basically, when you stop sap with stopsap command, sapstartsrv do not die. So I kill them manually.

    Also check,

    1516245 - sapstartsrv: several processes might be started on UNIX

    Hope it helps.

    best regards

    ashish

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 23, 2014 at 06:34 AM

    Hi Schmid,

    sapstartsrv is a process responsible for starting an instance. If you have multiple process running of sapstartsrv with same profile/user, if all is technically fine, the problem might be the way you are re-starting your system. Perhaps, the shared memory and semaphores were still latched when you have restated the system.

    And old orphaned process generally has no references to harm your current process. However, keep in mind, the process can cause problems at times.

    sapstartsrv uses locking OS locking mechanism on UNIX. If you go to /tmp file system, you can see a lockfile of this process .sapstartsrv<XX>_sapstartsrv.log. So make sure that no one is deleting these lock files.

    Regards,

    Divyanshu

    Add comment
    10|10000 characters needed characters exceeded

    • Not sure if any house keeping OS job kills these files in your case but yes, it could be of the prime reasons why this happens on your OS. Proper access control and groups assignment can prevent such things.

      Regards,

      Divyanshu

  • avatar image
    Former Member
    Jun 23, 2014 at 06:27 AM

    Dear @Benoît Schmid,

    This is not correctly performed stopsap script. I think you should use the following command after the stopsap:

    kill -9 | <sid>adm

    cleanipc 00 remove

    if you have central services instance

    cleanipc <number CS> remove

    ipcs | grep <sid>adm

    if any exist, remove it use ipcrm command.

    With best regards,

    Alexander

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jun 23, 2014 at 08:27 AM

    Hi,

    Can you post ps -ef|grep sapstartsrv output?

    Regards,

    Nick Loy

    Add comment
    10|10000 characters needed characters exceeded

    • Hello,

      Nick Loy wrote:

      I am talking about reboot of the server (If possible).

      I can tell you the result without rebooting it.

      Then I would have a single sapstartsrv.

      But I do not see why it would be helpfull to reboot.

      Regards.