Technical Blog Post
Automatically restarting the Managing Server upon system reboot.
Occasionally you may decide to reboot your server where your Managing Server (MS) is installed. Upon system reboot, you would prefer to restart all your Managing Server components automatically without having to run the commands manually. This can be achieved very easily. To make this work, you'll have to write a small startup script (see sample provided here) which will run automatically upon system restart/reboot. Before starting the MS, you will need to start DB2 and WAS first.
Here is a sample script you can use, note this was tested on an AIX system but should work for any Linux/Unix flavor with minor modifications: We're only providing this script as an outline, its up to you to test it and make sure it works in your environment. We're not responsible for its functioning.
-------------- start-of-script ----------------
echo "-----------------" >> /tmp/log.out
date >> /tmp/log.out
# start db2 with db2inst1 id
su - db2inst1 -c db2start >> /tmp/log.out
# start WAS with the root I'd
su - root -c /usr/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startServer.sh server1 -username admin -password pass1 >> /tmp/log.out
# start MS with the root id
su - root -c /opt/IBM/itcam/WebSphere/MS/bin/am-start.sh >> /tmp/log.out
-------------- end-of-script ----------------
Create this script in your /tmp dir and call it startMS.sh or a name of your choice. Change permissions on the script if needed. Note that I am starting DB2 in this script, but on most Linux/Unix systems, DB2 is automatically started. If its not started, then the script will attempt to start it for you. After you have created the script, add an entry in your crontab line like this:
@reboot /tmp/startMS.sh # run the MS startup script automatically upon system reboot.
After the system reboots/restarts, simply look at your /tmp/log.out file and see the entries in there to verify everything has started.
ITCAM / APM / ICAM L2 Support team