CA APM TIM service stop shows /sbin/service Killed message

Document ID : KB000116807
Last Modified Date : 03/10/2018
Show Technical Document Details
After upgrade TIM from 10.2 to 10.5.2 an additional message is displayed on 1 TIM server when stop or restart the TIM service from a command prompt. i.e. using command "service tim stop" or "tim service restart" this message is displayed:
/sbin/service: line 66: 8725 Killed env -i PATH="$PATH" TERM="$TERM" "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
There appears to be no adverse impact and the tim process is stopping/restarting successfully.
CA APM TIM 9.x, 10.x
The /etc/rc.d/rc.tim script requests the tim process to terminate with a SIGTERM.
However the tim process will take some time to stop all the timworker processes and if that does not complete within a specified period (default 60 seconds) the /etc/rc.d/rc.tim script will then send a SIGKILL ("kill -9") to kill the tim process and that is what causes the message.

As to why the message only occurs on the 1 TIM server.
Checking the number of timworker process on the machine showing the message and it was 32 i.e.
ps -ef|grep timworker|grep -v grep |wc -l

On another TIM server which did not show the message only 18 timworker processes were present i.e.
ps -ef|grep timworker|grep -v grep |wc -l

By default, unless overridden by tim/config/balancer.conf file, the number of timworker processes is set to the number of available CPUs on the server so that is why there is a timworker process count difference. The additional timworker processes are causing the delay in stopping the tim process and thus the message.
When the tim service is stopped the tim process is terminated but before it completes it needs to stop all running timworker processes. If the number of timworker processes is high the tim may not be able to stop them within the default 60 seconds wait period and if that occurs the tim process will then be killed which is what causes the message to be displayed.