您的位置:首页 > 运维架构

WAS维护常用操作

2015-10-26 14:32 330 查看
0.WAS学习地址:
http://www.open-open.com/doc/list/276?pn=1 http://www.doc88.com/p-7498799200332.html http://www.doc88.com/p-087655435197.html
1.WAS 各服务脚本的路径([b]UNIX环境下):[/b]

1.1启动顺序:
export JAVA_HOME=/app/IBM/WebSphere/AppServer/java
export LANG=zh_CN.gb18030(linux) Zh_CN.GB18030(AIX)

/data2/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/startManager.sh
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startNode.sh
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startServer.sh master
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startServer.sh server1
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/startServer.sh server2
/data2/IBM/HTTPServer/bin/apachectl –k start

1.2停止中间件顺序则相反,比如unix下停止was中间件:

/data2/IBM/HTTPServer/bin/apachectl –k stop      # (WAS 6.0时的命令)

/data2/IBM/HTTPServer/bin/httpd -d /data2/IBM/HTTPServer -k stop -f /data2/IBM/HTTPServer/conf/httpd.conf # (WAS6.0时的命令)

/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/stopServer.sh server1
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/stopServer.sh server2
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/stopServer.sh master
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin/stopNode.sh
/data2/IBM/WebSphere/AppServer/profiles/Dmgr01/bin/stopManager.sh

注意:启动的时候需要先启动master后才能启动其他的节点,如果水平集群则要先停止从服务器再停止主服务器,启动则先启动主再启动从。

2.示例-启动node agent 服务器:

[root@TEST144239 /]# cd /data2/IBM/WebSphere/AppServer/profiles/AppSrv01/bin

[root@TEST144239 bin]# sh startNode.sh

/data2/IBM/WebSphere/AppServer/profiles/Dmgr01/logs/dmgr/SystemErr.log
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/nodeagent/SystemErr.log
/data2/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/SystemErr.log


查看错误日志

配置工具配置过程以及生成部署EJB是否成功,可以查看日志
  was_sysconfig.log ---WAS中间件

3.1生成WAS内存溢出文件

生成javacore和heapdump例子:

/data2/IBM/AppServer/profiles/AppSrv01/bin>sh wsadmin.sh

WASX7209I: 使用 SOAP 连接器连接到节点 javavagNode01 上的进程“server1”;进程的

类型为:UnManagedProcess

WASX7029I: 要获取帮助,请输入:“$Help help”

wsadmin>set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]

WebSphere:name=JVM,process=server1,platform=proxy,node=javavagNode01,j2eeType=JV

M,J2EEServer=server1,version=6.1.0.11,type=JVM,mbeanIdentifier=JVM,

cell=javavagN ode01Cell,spec=1.0

wsadmin>$AdminControl invoke $jvm dumpThreads

生成的javacore位置为:

/data2/IBM/AppServer/profiles/AppSrv01/javacore.20090410.153958.3564.txt

wsadmin>set objectName [$AdminControl queryNames WebSphere:type=JVM,process=server1,*]

WebSphere:name=JVM,process=server1,platform=proxy,node=javavagNode01,j2eeType=JVM,

J2EEServer=server1,version=6.1.0.11,type=JVM,mbeanIdentifier=JVM,cell=javavagNode01Cell,spec=1.0

wsadmin>$AdminControl invoke $objectName generateHeapDump

wsadmin>

生成的Heapdump文件位置为:

/data2/IBM/AppServer/profiles/AppSrv01/heapdump.20090410.154059.3564.phd

4.WAR包部署发布后的路径:

[root@TEST144239 ~]# cd /data2/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps

[root@TEST144239 installedApps]# ll

总用量 4
drwxr-xr-x 3 root root 4096 3月 21 15:53 HASOMSPRODWEB1Cell01
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: