WAS维护常用操作


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 各服务脚本的路径(UNIX环境下)

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.shserver1
/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

ADMU0116I: 正在文件
             /data2/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/nodeagent/startServer.log
           中记录工具信息

ADMU0128I: 正在启动具有   AppSrv01 概要文件的工具
ADMU3100I: 正在从服务器读取配置:nodeagent
ADMU3200I: 服务器已启动。正在等待初始化状态。
ADMU3000I: 为电子商务开放服务器   nodeagent;进程标识为 4911
启动过程细节

2.1查看服务器状态:

[root@TEST144239 bin]# sh serverStatus.sh -all

ADMU0116I:   正在文件

             /data2/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/serverStatus.log

           中记录工具信息

ADMU0128I:   正在启动具有   AppSrv01 概要文件的工具

ADMU0503I:   正在检索所有服务器的服务器状态

ADMU0505I:   在配置中找到服务器:

ADMU0506I:   服务器名称:nodeagent

ADMU0506I:   服务器名称:server1

ADMU0506I:   服务器名称:webservers1

区域/单元名:   <default>

Username:   admin

Password:                                                                                                                                                                                                   ADMU0508I: Node Agent“nodeagent”处于 STARTED 状态

ADMU0509I:   无法访问   Application Server“server1”。它似乎已停止。

ADMU0508I:   Web server“webservers1”处于 STOPPED 状态
查看服务状态

2.2启动服务

[root@TEST144239   bin]# sh startServer.sh server1 –trace

ADMU0116I:   正在文件

             /data2/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/startServer.log

           中记录工具信息

ADMU0128I:   正在启动具有   AppSrv01 概要文件的工具

ADMU3100I:   正在从服务器读取配置:server1

ADMU3200I:   服务器已启动。正在等待初始化状态。

ADMU3000I:   为电子商务开放服务器   server1;进程标识为 5648
启动服务

2.3关闭服务

[root@TEST144239 bin]# sh stopServer.sh server1 -username admin -password admin

ADMU0116I: 正在文件

           /data2/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/server1/stopServer.log

           中记录工具信息

ADMU0128I: 正在启动具有 AppSrv01 概要文件的工具

ADMU3100I: 正在从服务器读取配置:server1

ADMU3201I: 发出了服务器停止请求。等待停止状态。

ADMU4000I: 服务器 server1 停止已完成。
关闭服务

2.4HTTP服务

[root@TEST144239 bin]# pwd
/data2/IBM/HTTPServer/bin
[root@TEST144239 bin]# httpd -d /data2/IBM/HTTPServer -k stop -f /data2/IBM/HTTPServer/conf/httpd.conf

3.查看错误日志

[root@TEST144239 ~]# find /data2/IBM -name SystemErr.log

/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

优质内容筛选与推荐>>
1、ImageJ 学习第一篇
2、[stm32] SIM808模块之发短信\GPS\TCP\HTTP研究
3、linux-网站收藏
4、oracle查询表的所有列名
5、在js中取选中的radio值


长按二维码向我转账

受苹果公司新规定影响,微信 iOS 版的赞赏功能被关闭,可通过二维码转账支持公众号。

    阅读
    好看
    已推荐到看一看
    你的朋友可以在“发现”-“看一看”看到你认为好看的文章。
    已取消,“好看”想法已同步删除
    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号





    联系我们

    欢迎来到TinyMind。

    关于TinyMind的内容或商务合作、网站建议,举报不良信息等均可联系我们。

    TinyMind客服邮箱:support@tinymind.net.cn