on 06-23-2014 7:07 AM
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.
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,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Divyanshu Srivastava wrote:
It looks like this was the cause of multiple process. However, rather than disabling, why not create a copy of this script, custom version to clean tmp without removing any sap files.
I have have find out .sap* and jstartup_*.
What are the other "sap files"?
Regards,
Hello,
Divyanshu Srivastava wrote:
That's all I believe, just take care of .sap* files, as tmp is a non-sap space and sap won't make any files on such location without using 'sap' as a key word in file name.
Also, by saying 'any sap file' I meant sapstartsrv lock files .
What are the side effects of deleteing the .jstartup_*.fifo?
Regards,
Hello,
Divyanshu Srivastava wrote:
Hi Schmid,
If you got your replies then you can mark and close the thread .
Regards.
Divyanshu
Are you sure that SAP does not need others files sap* and jstartup_* in /tmp?
Basically, I can blindly delete them and there is no side effect for SAP.
Only if it is the case, I can close the thread.
regards,
Please give read/write access to /tmp file system to <sid>adm user, it will take care own its own all temp files.
When your will stop SAP and execute cleanipc command successfully with <sidadm> all files which are not required should be removed. For java fifo files, as said before, they can be removed any time but not at system start up, same applies for other files generated at the time of startup.
Regards,
Divyanshu
Hello,
Divyanshu Srivastava wrote:
Please give read/write access to /tmp file system to <sid>adm user, it will take care own its own all temp files.
When your will stop SAP and execute cleanipc command successfully with <sidadm> all files which are not required should be removed. For java fifo files, as said before, they can be removed any time but not at system start up, same applies for other files generated at the time of startup.
Regards,
Divyanshu
The problem is not that /tmp is not available.
The problem is due to the fact that Redhat delete sap files.
On this thread, I have been advised to add filters so that the files created and used by sap
are not deleted.
Therefore wht I need to know is the following:
Are you sure that SAP does not need others files sap* and jstartup_* in /tmp?
Basically, I can blindly delete them and there is no side effect for SAP.
Only if it is the case, I can close the thread.
Regards,
Divyanshu Srivastava wrote:
No, you cannot blindly delete these files. Only when the system is down and cleanipc is not able to clean, you can delete them, it's that time when SAP don't need them.
Regards,
Divyanshu
I know that I can not blindly delete them.
But what I would like to know is
"Are you sure that SAP does not need others files sap* and jstartup_* in /tmp?"
In other words, what are the other files that should not be blindly deleted 🙂
Is it clear?
Regards,
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
Hi,
Can you post ps -ef|grep sapstartsrv output?
Regards,
Nick Loy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Nick Loy wrote:
Hi,
Can you post ps -ef|grep sapstartsrv output?
Regards,
Nick Loy
I have killed the second instance for instance 00:
sidadm 11433 1 0 Jun10 ? 00:01:24 /usr/sap/SID/SCS01/exe/sapstartsrv pf=/usr/sap/SID/SYS/profile/START_SCS01_hostnameX -D
sapadm 14324 1 0 Jun10 ? 00:00:46 /usr/sap/hostctrl/exe/sapstartsrv pf=/usr/sap/hostctrl/exe/host_profile -D
sidadm 38117 1 0 Jun21 ? 00:00:04 /usr/sap/SID/SCS01/exe/sapstartsrv pf=/usr/sap/SID/SYS/profile/START_SCS01_hostnameX -D
sidadm 39648 1 0 Jun21 ? 00:00:05 /usr/sap/SID/DVEBMGS00/exe/sapstartsrv pf=/usr/sap/SID/SYS/profile/START_DVEBMGS00_hostnameX -D
root 42955 41556 0 10:35 pts/1 00:00:00 grep sapstartsrv
Regards,
Hello,
Nick Loy wrote:
But there is no difference between initial output and the latest one.
Still it shows 4 entries (there should be 2)!
Have your tried to restart the entire system to clean up the hung processes?
No there is a difference because it is not duplicated for DVEBMGS00.
By restaring, which command exactly would you expect me to perform?
Regards.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Divyanshu Srivastava wrote:
These files will not allow any other process of sapstarsrv for same instance to start on the operating system level automatically. Thus, putting a constraint on multiple sapstartsrv process for a same instance.
Is it correct to say that the most probable source of the problem is a batch job of redhat that cleans
/tmp?
Regards,
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.