Force Start/Stop CCMS Agent in UNIX & Linux

Sometimes, the CCMS Agent failed to restart/stop due to some shared memory issue. To further investigate this issue, you can check status for CCMS Agent to initialize the memory in the operating system.

If this happen to your system, refer to the CCMS Agent status log, you can define that the CCMS Agent exiting with code 0, showing it is active, but refer to the info log, it is stating that the CCMS Agent is running (no actual pid, but actual shared memory). By right, the CCMS Agent that has been started up, must have a process ID (PID) attached to it. So, to encounter this problems, we can clear the shared memory and attached back to the CCMS Agent by running the following command.

INFO: CCMS agent sapccmsr working directory is /usr/sap/ccms/xx/sapccmsr

INFO: CCMS agent sapccmsr config file is /usr/sap/ccms/xx/sapccmsr/csmconf
INFO: Setting Stop Flag for sapccmsr

INFO: Waiting for background process to stop...
INFO: Background process has not stopped after 10 seconds.
INFO: Process might be busy..
INFO: Please try again.

EXITING with code -1

SAPCCMSR Agent

> sapccmsr profile=/sapmnt/<SID>/profile/<instance_profile> -j2ee –initshm

SAPCCM4X Agent

> sapccm4x profile=/sapmnt/<SID>/profile/<instance_profile> -initshm

Source: http://itsiti.com/force-start-stop-ccms-agent-in-unix-linux