2012-06-07 // Cleanup leftover SAPOSCOL shared memory segment
The SAP saposcol process sometimes refuses to start, claiming there's already a saposcol process running even if there really isn't. Most of the time i found that this is due to a leftover shared memory segment. This usually happens when saposcol was previously not properly shutdown or otherwise being killed. Normally a:
$ saposcol -c pf=<path to profile>
takes care of this, but sometimes even that doesn't seem to do the trick. In this case SAP Note 548699, especially item 7, comes in handy. Basically, you look for the leftover shared memory segment identified by the saposcols key and you remove it manually with the OS tools:
$ ipcs -ma | grep '4dbe' T ID KEY MODE OWNER GROUP CREATOR CGROUP NATTCH SEGSZ CPID LPID ... m 1048576 0x00004dbe --rw-rw-rw- root system root system 1 1839766 4915206 5046426 ... $ ipcrm -m 1048576
Once the shared memory segment has been removed, saposcol can be started again. Be careful though, in recent versions or if you installed the SMD agent, saposcol is started from the SAP host agent!
Related or otherwise interesting SAP Notes: 710975.