This came up in a conversation during a WAS 8.5.5 enablement session today.
Stopping WebSphere Application Server - dmgr ...
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/stopServer.log
ADMU0128I: Starting tool with the Dmgr01 profile
ADMU3100I: Reading configuration for server: dmgr
Realm/Cell Name: <default>
Username: wasadmin
Password:
ADMU3201I: Server stop request issued. Waiting for stop status.
ADMU4000I: Server dmgr stop completed.
It is possible to register and run a WAS server as a service on Linux.
This is how: -
$ /opt/IBM/WebSphere/AppServer/bin/wasservice.sh
CWSFU0010I: Usage: wasservice [options]
options:
[-start] <service name>
-add <service name>
-serverName <server name>
-profilePath <service profile directory>
[-wasHome <install root>]
[-userid <user id>]
[-startArgs <additional startServer parameters>]
[-stopArgs <additional stopServer parameters>]
-remove <service name>
-stop <service name>
-status <service name>
options:
[-start] <service name>
-add <service name>
-serverName <server name>
-profilePath <service profile directory>
[-wasHome <install root>]
[-userid <user id>]
[-startArgs <additional startServer parameters>]
[-stopArgs <additional stopServer parameters>]
-remove <service name>
-stop <service name>
-status <service name>
$ /opt/IBM/WebSphere/AppServer/bin/wasservice.sh -add foobar -serverName dmgr -profilePath /opt/IBM/WebSphere/AppServer/profiles/Dmgr01/
Interestingly, the service name foobar gets "renamed" to foobar_was.init as evidenced here: -
$ls -altrc /etc/init.d/
-rwxr-xr-x 1 root root 1938 Jun 23 16:51 irqbalance
-rwxr-xr-x 1 root root 2571 Jun 23 16:51 mdmonitor
-rwxr-xr-x 1 root root 9980 Jun 24 13:30 jexec
drwxr-xr-x. 2 root root 4096 Jun 24 15:20 .
-rwx--x--x 1 root root 3335 Jun 24 15:20 foobar_was.init
-rwxr-xr-x 1 root root 2571 Jun 23 16:51 mdmonitor
-rwxr-xr-x 1 root root 9980 Jun 24 13:30 jexec
drwxr-xr-x. 2 root root 4096 Jun 24 15:20 .
-rwx--x--x 1 root root 3335 Jun 24 15:20 foobar_was.init
and: -
$ chkconfig --list | grep -i foobar
foobar_was.init0:off1:off2:on3:on4:on5:on6:off
I can now manage the server using standard Linux commands e.g.
$ service foobar_was.init start
Starting WebSphere Application Server - dmgr ...
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/startServer.log
ADMU0128I: Starting tool with the Dmgr01 profile
ADMU3100I: Reading configuration for server: dmgr
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server dmgr open for e-business; process id is 54588
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/startServer.log
ADMU0128I: Starting tool with the Dmgr01 profile
ADMU3100I: Reading configuration for server: dmgr
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server dmgr open for e-business; process id is 54588
$ service foobar_was.init status
WebSphere Application Server - dmgr is running.
$ service foobar_was.init stop
Stopping WebSphere Application Server - dmgr ...
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/stopServer.log
ADMU0128I: Starting tool with the Dmgr01 profile
ADMU3100I: Reading configuration for server: dmgr
Realm/Cell Name: <default>
Username: wasadmin
Password:
ADMU3201I: Server stop request issued. Waiting for stop status.
ADMU4000I: Server dmgr stop completed.