Wednesday, July 2, 2008
Reduce deployment time of web applications and portlets
By tuning your client OS network settings can provide some relief, By default Windows XP network settings are far below the standard of hardware and network speed that we use nowadays. Hence, Depending on the type of network connection you have, you might be able to tweak your connection so that the speed of your Internet, as well as your local area network, will be faster. By hacking the System Registry and editing the TCP/IP parameters, you can fine-tune the values to take advantage of more reliable, faster Internet connections, such as DSL and cable.
When i was researching , I came across this article Hacking Windows XP: Speed Up Your Network and Internet Access and by following it i was able to improve by netowrk performance of my Windows XP laptop to 4-6 times , Hence i would recommend for the administrators to do the same or atleast the last section "Tweaking your Internet connection for speed " to resolve most of their deployment problems due to network slowness. Not only this reduced the deployment time , it also helped when transfering huge and large number of doucments from PDM libraries using PDM desktop component, while uploading logs to IBM support , prevented IE browser timeouts, etc. Note users with Linux or MAC desktop/laptop clients may not experience this issue as the default network settings on this OS are fair enough to get optimal speeds.
Friday, December 7, 2007
How to identify running WebSphere process as Dmgr or Nodeagent or Appserver process ?
(e.g) Example of a websphere dmgr process in Linux
root 20308 0.2 2.6 450200 331496 ? S Dec06 3:39 /usr/IBM/WebSphere/AppServer/java/bin/java
-Xbootclasspath/p:/usr/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmorb.jar:/usr/IBM/WebSph
ere/AppServer/java/jre/lib/ext/ibmext.jar -Dwas.status.socket=62306 -classpath /usr/IBM/WebS
phere/AppServer/profiles/Dmgr02/properties:/usr/IBM/WebSphere/AppServer/properties:/usr/
IBM/WebSphere/AppServer/lib/bootstrap.jar:/usr/IBM/WebSphere/AppServer/lib/j2ee.jar:/usr/IB
M/WebSphere/AppServer/lib/lmproxy.jar:/usr/IBM/WebSphere/AppServer/lib/urlprotocols.jar -X
ms50m -Xmx256m -Dws.ext.dirs=/usr/IBM/WebSphere/AppServer/CEI/lib:/usr/IBM/WebSphere/A
ppServer/CEI/client:/usr/IBM/WebSphere/AppServer/java/lib:/usr/IBM/WebSphere/AppServer/pr
ofiles/Dmgr02/classes:/usr/IBM/WebSphere/AppServer/classes:/usr/IBM/WebSphere/AppServer
/lib:/usr/IBM/WebSphere/AppServer/installedChannels:/usr/IBM/WebSphere/AppServer/lib/ext:/u
sr/IBM/WebSphere/AppServer/web/help:/usr/IBM/WebSphere/AppServer/deploytool/itp/plugins/c
om.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/usr/IBM/WebSphere/AppServer/derby -
Dcom.ibm.itp.location=/usr/IBM/WebSphere/AppServer/bin -Djava.util.logging.configureByServer
=true -Dibm.websphere.preload.classes=true -Duser.install.root=/usr/IBM/WebSphere/AppServer/
profiles/Dmgr02 -Dwas.install.root=/usr/IBM/WebSphere/AppServer -Djava.util.logging.manage
r=com.ibm.ws.bootstrap.WsLogManager -Ddb2j.system.home=/usr/IBM/WebSphere/AppServer
/cloudscape -Dserver.root=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02 -Djava.awt.headless
=true -Djava.security.auth.login.config=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02/properti
es/wsjaas.conf -Djava.security.policy=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02/propertie
s/server.policy com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /usr/IBM/WebS
phere/AppServer/profiles/Dmgr02/config xx181uspln2Cell01 xx181uspln2CellManager01 dmgr The normal process to list a process in Unix environment is to run ps -ef and grep the name of the process, if you now the name.(e.g) ps -ef grep java. The issue is that by default the OS will show 80 characters of the process string or to the widhth of the terminal which is anyway 80 by default in most of the terminals, hence if you try to list the websphere java process where different process types like dmgr, nodeagent, appserver all running in the same box you would pretty much get the same string as there won't be any noticable difference because the classpath, etc would be pretty much same for the all process. Hence we need to use the following ps command with addtional parameters for to indentify the respective websphere process.
To determine if Deployment Manager (dmgr) is running ,
AIX : ps -auxww grep dmgr
LINUX : ps -auxww grep dmgr
SOLARIS: /usr/ucb/ps -auxww grep dmgr (Note you need to run specifically from this directory , otherwise you will invoke ps from /usr/bin which will not like the arguments )
(e.g)
root 20308 0.2 2.6 450200 331496 ? S Dec06 3:39 /usr/IBM/WebSphere/AppServer/java/bin/java
-Xbootclasspath/p:/usr/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmorb.jar:/usr/IBM/WebSph
ere/AppServer/java/jre/lib/ext/ibmext.jar -Dwas.status.socket=62306 -classpath /usr/IBM/WebS
phere/AppServer/profiles/Dmgr02/properties:/usr/IBM/WebSphere/AppServer/properties:/usr/
IBM/WebSphere/AppServer/lib/bootstrap.jar:/usr/IBM/WebSphere/AppServer/lib/j2ee.jar:/usr/IB
M/WebSphere/AppServer/lib/lmproxy.jar:/usr/IBM/WebSphere/AppServer/lib/urlprotocols.jar -X
ms50m -Xmx256m -Dws.ext.dirs=/usr/IBM/WebSphere/AppServer/CEI/lib:/usr/IBM/WebSphere/A
ppServer/CEI/client:/usr/IBM/WebSphere/AppServer/java/lib:/usr/IBM/WebSphere/AppServer/pr
ofiles/Dmgr02/classes:/usr/IBM/WebSphere/AppServer/classes:/usr/IBM/WebSphere/AppServer
/lib:/usr/IBM/WebSphere/AppServer/installedChannels:/usr/IBM/WebSphere/AppServer/lib/ext:/u
sr/IBM/WebSphere/AppServer/web/help:/usr/IBM/WebSphere/AppServer/deploytool/itp/plugins/c
om.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/usr/IBM/WebSphere/AppServer/derby -
Dcom.ibm.itp.location=/usr/IBM/WebSphere/AppServer/bin -Djava.util.logging.configureByServer
=true -Dibm.websphere.preload.classes=true -Duser.install.root=/usr/IBM/WebSphere/AppServer/
profiles/Dmgr02 -Dwas.install.root=/usr/IBM/WebSphere/AppServer -Djava.util.logging.manage
r=com.ibm.ws.bootstrap.WsLogManager -Ddb2j.system.home=/usr/IBM/WebSphere/AppServer
/cloudscape -Dserver.root=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02 -Djava.awt.headless
=true -Djava.security.auth.login.config=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02/properti
es/wsjaas.conf -Djava.security.policy=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02/propertie
s/server.policy com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /usr/IBM/WebS
phere/AppServer/profiles/Dmgr02/config xx181uspln2Cell01 xx181uspln2CellManager01 dmgr Simlarly you can find for other types of WebSphere processes:To determine if Nodeagent is running ,
AIX : ps -auxww grep nodeagent
LINUX : ps -auxww grep nodeagent
SOLARIS : /usr/ucb/ps -auxww grep nodegent (Note you need to run specifically from this directory , otherwise you will invoke ps from /usr/bin which will not like the arguments )
To determine if AppServer is running ,
AIX : ps -auxww grep <appservername>
LINUX : ps -auxww grep <appservername>
SOLARIS: /usr/ucb/ps -auxww grep <appservername> (Note you need to run specifically from this directory , otherwise you will invoke ps from /usr/bin which will not like the arguments )
(e.g) ps -auxww grep server1 - to list the process of websphere Applicatoin Server named server1.
(e.g) ps -auxww grep WsServer - to list all the process of the websphere installation.
Steps involved in moving WebSphere dmgr from one host (machine1) to another host (machine2) with the hostname change :
1) As a caution make please make a backup of the following so that it's easy to restore when something goes wrong,
a) Backup the configuration of all the profiles (DMGR) and (AppSrv) in machine1 that is involved in the cell .
(eg) basically run WAS_ROOT/bin/backupconfig.sh which will create WebSphereConfig_2007-11-16.zip
b) (Optional) Also do a filesystem backup of the
2) Install WebSphere ND in the new box and create a new Dmgr profile with machine2_dmgr_profile .
3) Extract the WebSphereConfig_2007-11-16.zip to <machine2_dmgr_profile_root>/config directory.
(eg) jar -xvf WebSphereConfig_2007-11-16.zip
4) if <machine2_dmr_profile_root>is different than <machine1_dmr_profile_root> than change USER_INSTALL_ROOT "value" in /config/cells/<cell>/nodes/<nodecellmanager>/variables.xml to point to the new dmgr profile location.
(eg) <entries xmi:id="VariableSubstitutionEntry_2" symbolicName="USER_INSTALL_ROOT" value="/usr/IBM/WebSphere/AppServer/profiles/Dmg
r02" description="The filesystem path to the user installaton directory."/>
5) Change the following properties in <machine2_dmr_profile_root>/bin/setupcmdLine.sh to point to the machine1 dmgr cell name and node name.
(eg) WAS_CELL=machine1Cell01
WAS_NODE=machine1CellManager01
6) Copy the custom keyfiles (*.jks) from <machine1_dmr_profile_root>/etc/ to <machine2_dmr_profile_root>/etc; or skip this step if dmgr is using the default keys.
7) Follow the instructions mentioned in http://www-1.ibm.com/support/docview.wss?rs=180&context=SSEQTP&q1=best+practices&uid=swg27007419&loc=en_US&cs=utf-8&lang=en from page 4-6 on section 2 and 2.1
8) check if syncs works for all the nodes and you were able to see all the configurations from the previous dmgr.