On Unix/Linux, defunct entries are not cleared instantly from table MQSRV, it takes around 10 minutes.
Upon further investigation, it appeared that specifically, all the Java Processes (JCP, REST and JWP) left their entry in MQSRV.
Consequently, some CPs (REST/JCP) or WPs (JWP) get higher numbers (CPxxx, WPxxx) than expected.
Release: 21.0/24.0
Unix/Linux
When stopping the system, the Service Manager sends a SIGTERM to all its subprocesses.
This leads to a message in the log file:
U00011816 Server 'AUTOMIC#CPxxx': Termination initiated.
or
U00011816 Server 'AUTOMIC#WPxxx': Termination initiated.
After this, the process writes the last log messages to RH/RT, notifies the PWP and deletes its own entry from the MQSRV table.
However, in case a Java process is started with the -Xrs option, the SIGTERM of the Service Manager is blocked and not received by the hook.
The process is stopped but not gracefully.
Start the Java processes without the -Xrs option, e.g.:
/usr/bin/java -Xmx2G -jar ucsrvjp.jar -I/automic/smgr/bin/../../ae/bin/ucsrv.ini -svc8871
/usr/bin/java -Xmx2G -jar ucsrvjp.jar -I/automic/smgr/bin/../../ae/bin/ucsrv.ini -svc8871 -cp
/usr/bin/java -Xmx2G -jar ucsrvjp.jar -I/automic/smgr/bin/../../ae/bin/ucsrv.ini -svc8871 -rest