Not all of them are useful, and if you are a learner, you may not be aware of some of the powerful scripts to use in daily work. I have listed some of the most useful scripts to ease your life as WebSphere Administrator. Following scripts are tested in IBM WAS ND 8.5.5 environment and don’t see any reason it won’t work in any other environment.

Stopping & Starting Deployment Manager, Node Agent & JVM

stopManager.sh

You can stop the Deployment Manager using above command. Note: this has to be executed in DMGR profile path.

startManager.sh

You can start the Deployment Manager using above command. Note: this has to be executed in DMGR profile path.

startServer.sh

To start the JVM, you can use startServer.sh with server name like below. Note: Node Agent must be started before starting JVM.

stopServer.sh

You can shutdown JVM by executing above command along with JVM name.

stopNode.sh

To stop the respective Node Agent, you have to go to that profile and execute stopNode.sh to stop the Node Agent.

startNode.sh

Go to respective profile and execute startNode.sh to start the Node Agent.

serverStatus.sh

To find out JVM’s status, you can use this script with –all argument. This must be executed in respective profile level. If you execute this in DMGR profile level, it will just show the status of DMGR.

Backup & Restore

backupConfig.sh

One of the first things to learn while working in production support is to how to take a backup. When nothing works – backup helps. You can use this script to take a backup of your WebSphere environment configuration. As a best practice, you can use “–nostop” argument, so it takes a backup without stopping Deployment Manager.

restoreConfig.sh

If you have changed configuration and things are not as expected and there is a time to restore your configuration. Well, you can use the backup file to restore the configuration. Do you like it so far? Scroll down for more fun!

Getting version & fix pack information

versionInfo.sh

To find out WAS version, build level, package, architecture & installed features installed on your server. Note: you may be interested in following supported arguments.

-fixpacks: To display fix packs information -long: To display all fix packs and ifixes -ifixes: To display ifixes information

getHistoryReport.sh

If you are performing auditing or just want to list out components, fixes, refresh pack with dates, you can run this command, which will generate historyReport.html in current working directory, which is usually bin folder.

getVersionReport.sh

To display build version and build date of WebSphere installation. Often asked by IBM support guys to investigate if any suspected issue with a particular version.

Clearing the Cache

There might be various reasons to clear the cache the most obvious one would be after an upgrade. There are two caches that you should consider clearing 1) JVM 2) OSGi.

clearClassCache.sh

To clear JVM’s class cache, you can execute above script. Note: JVM’s must be stopped before clearing class caches.

osgiCfgInit.sh

Execute above command to clear OSGi profile & server cache. Note: don’t forget to stop the running processes before clearing caches.

Managing Profiles

managesdk.sh

You can toggle the version if you have installed multiple SDK. You can also use this script to find out available associated SDK to your profile. Below example shows a list of available SDK.

pmt.sh

PMT (Profile Management Tool) can be used to create WebSphere profiles in GUI mode. Creating profiles using PMT is very easy – all you got to do is create the desired level of profile and follow the wizard. You got to try it!

syncNode.sh

For some reason, if you can’t perform Node Sync through Administration Console, you can use syncNode.sh from profile level. Node Agent must be stopped before use this script. You have to pass an argument for DMGR host & SOAP port number.

localhost = Deployment Manager hostname 8879 = DMGR SOAP Port number

I hope above scripts are useful to your daily work. Take your career to one level up by learning cloud computing.

Useful WebSphere Application Server Administration Scripts - 62Useful WebSphere Application Server Administration Scripts - 79Useful WebSphere Application Server Administration Scripts - 68Useful WebSphere Application Server Administration Scripts - 85Useful WebSphere Application Server Administration Scripts - 24Useful WebSphere Application Server Administration Scripts - 49Useful WebSphere Application Server Administration Scripts - 6Useful WebSphere Application Server Administration Scripts - 91Useful WebSphere Application Server Administration Scripts - 45Useful WebSphere Application Server Administration Scripts - 90Useful WebSphere Application Server Administration Scripts - 65Useful WebSphere Application Server Administration Scripts - 93Useful WebSphere Application Server Administration Scripts - 92Useful WebSphere Application Server Administration Scripts - 35Useful WebSphere Application Server Administration Scripts - 71Useful WebSphere Application Server Administration Scripts - 79Useful WebSphere Application Server Administration Scripts - 97Useful WebSphere Application Server Administration Scripts - 87Useful WebSphere Application Server Administration Scripts - 18Useful WebSphere Application Server Administration Scripts - 77Useful WebSphere Application Server Administration Scripts - 18Useful WebSphere Application Server Administration Scripts - 71Useful WebSphere Application Server Administration Scripts - 30