OS Collector SAPOSCOL Interview FAQ
1. Question: How do I install saposcol?
a) To install saposcol, just copy the latest version available on the SAP Service Marketplace: service.sap.com/swcenter-main.
b) (Windows only) After that, you can set up the saposcol as a service.
2. Question: How do I get all the commands of saposcol?
Answer: In order to be able to execute commands, the saposcol should be running. Saposcol is started by command "saposcol –l". The saposcol is controlled by the OS command “saposcol <option>”. In order to find out what <options> are possible, execute command “saposcol -?” and you get an output of all commands of saposcol.
(Note: Often the above output does not give the meaning of command “saposcol -ztl” – activation of cycle trace.)
3. Question: What commands can be executed in dialog mode of saposcol?
Answer: The saposcol command “saposcol -d” starts the dialog mode of saposcol. Please use command “help” for a list of possible commands in the dialog mode. To exit the dialog mode of saposcol, execute command “exit”.
4. Question: How do I check whether saposcol is running and under what user (root or <sid>adm) (Unix)?
Answer: First you can execute command "saposcol -s" or "saposcol -d" > status in order to see the content of the shared memory. This will provide you with information as to whether the collector is running or not.
On Unix you can also execute command: ps -ef | grep saposcol
If saposcol is running, the output will give you the saposcol process ID. Depending on which user is running saposcol, the output will be similar either to:
root 17700 1 1 Jun 28 ? 349:27 saposcol –tzl (if saposcol running under user root)
<sid>adm 17700 1 1 Jun 28 ? 349:27 saposcol –tzl (if saposcol running under user <sid>adm).
5. Question: How can I change the owner and group of file saposcol? What properties should file saposcol have (Unix)?
Answer: Execute command:
ls -la /usr/sap/<SID>/SYS/exe/run/saposcol
saposcol should have file properties similar to the following example: -rwsr-x--- 1 root sapsys 320434 Apr 3 18:00 saposcol
To change the saposcol file to owner root, group sapsys, mode 4750, log in as root to your unix system:
chown root saposcol
chgrp sapsys saposcol
chmod 4750 saposcol
6. Question: How do I stop saposcol if standard commands (points 2 and 3) do not work (Unix)?
Answer: Sometimes it may be impossible to stop saposcol either by “saposcol -d” --> kill or by “saposcol -k”. The system produces messages similar to:
can't kill process 34570.
kill: No such process
ERROR:No reaction from collecting process 34570!
Please kill collecting process.
Although no process with PID 34570 exists, the output of command “saposcol -s” shows that saposcol is running and shared memory is attached. In this case, you can execute command: "cleanipc 99 remove".
If this does not work either, it is possible to stop the collector running by removing the shared memory key of saposcol.
7. Question: How do I remove the shared memory key of saposcol?
Answer: Sometimes it may be necessary to remove the shared memory key of saposcol (see point 6).
Caution: Please be very careful! This procedure should be performed only after checking that saposcol is really not running (see point 4) and only in cases when other options (see point 6) really do not work!
For this, execute command “ipcs -ma” and note the line that contains saposcol key “4dbe”. You need the shared memory ID. After that, execute command ipcrm -m ID
Now the command “saposcol -s” should show that saposcol is not running and that the shared memory is not attached. The shared memory key will be created automatically by the saposcol when the collector is next started: “saposcol -l”.