`

IBM WebSphere Performance Tool / ISA / jca457.jar / ha456.jar / ga439.jar

阅读更多

IBM Support Assistant

http://www-01.ibm.com/software/support/isa/

http://www-01.ibm.com/support/docview.wss?rs=3455&uid=swg27013116

https://www6.software.ibm.com/sdfdl/v2/regs2/ltrinh/isalite/Xa.2/Xb.Ya9TPFV8hqfzAb1qaGXA6xLC2kwsjQXw7N9kQMr5hA/Xc.ISALite134ForCommerce_Unix_05252011.tar/Xd./Xf.LPr.AAvi/Xg.6173793/Xi.swg-isalite/XY.regsrvs/XZ.CndMAExx55yvgHarHs2pcP_Uf-4/ISALite134ForCommerce_Unix_05252011.tar

IBM Support Assistant 5.0

https://www6.software.ibm.com/sdfdl/v2/regs2/ltrinh/Xa.2/Xb.Mk60vqr-h3fVnqSz0qm14A5UQHNexwAQGQK78GZTQA/Xc.isa-5.0.0.techpreview-win.zip/Xd./Xf.LPr.D1vk/Xg.6365216/Xi.isa/XY.regsrvs/XZ.RjdZ93HfoqB9V7AU9zi0jMAu-Vo/isa-5.0.0.techpreview-win.zip

https://www6.software.ibm.com/sdfdl/v2/regs2/ltrinh/Xa.2/Xb.Mk60vqr-h3fVnqSz0qm14A5UQHNexwAQGQK74gajpQ/Xc.isa-5.0.0.techpreview-win-x86_64.zip/Xd./Xf.LPr.D1vk/Xg.6365216/Xi.isa/XY.regsrvs/XZ.wC_gFsnjaay6hF4aB6L2JaOLdq4/isa-5.0.0.techpreview-win-x86_64.zip

https://www6.software.ibm.com/sdfdl/v2/regs2/ltrinh/Xa.2/Xb.Mk60vqr-h3fVnqSz0qm14A5UQHNexwAQGQK7R73yBw/Xc.isa-5.0.0.techpreview-linux-x86_64.tar.gz/Xd./Xf.LPr.D1vk/Xg.6365216/Xi.isa/XY.regsrvs/XZ.a8h0ZVmgjfzpU4DSg5lfGeAH10E/isa-5.0.0.techpreview-linux-x86_64.tar.gz

Java Troubleshooting Tools

WebSphere Application Server Troubleshooting Tools

Cross-product Troubleshooting Tools

Information Management Tools

LotusTools

Remote Assistance Tools

Other Tools

jca.jar / jca457.jar

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=2245aa39-fa5c-4475-b891-14c205f7333c

http://dl.iteye.com/topics/download/aaf63b2d-0d7f-334e-b8a5-15bf0e31aad9

ha.jar / ha456.jar

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=4544bafe-c7a2-455f-9d43-eb866ea60091

http://dl.iteye.com/topics/download/f7c8ba21-3d9e-34f9-b123-89fab381347a

ga.jar / ga456.jar

https://www.ibm.com/developerworks/community/groups/service/html/communityview?communityUuid=22d56091-3a7b-4497-b36e-634b51838e11

http://dl.iteye.com/topics/download/363a80e8-7881-3b87-9e1e-a2adf8389f94

IBM ISA PMAT:java –Xmx[heapsize] –jar ga439.jar 

 

IBM ISA TMDA:Java –Xmx[heapsize] –jar jca457.jar 

 

IBM ISA  HeapAnalyzer:java –Xmx[heapsize] –jar ha456.jar 

 

 

developerWorks 图书频道: 构建高性能 WebSphere 企业级应用

http://www.ibm.com/developerworks/cn/websphere/book_websphere_performance/

构建高性能WebSphere企业级应用

第 1 部分 综述篇

第 1 章 性能与 WebSphere 企业级应用

1.1 WebSphere 企业级应用

1.1.1 WebSphere 应用

1.1.2 企业级应用

1.1.3 电子商务应用

1.2 性能问题

1.2.1 一个虚构的场景

1.2.2 性能问题的现象

1.2.3 性能问题的影响

1.2.4 性能相关概念

1.3 构建高性能 WebSphere 应用

1.3.1 WebSphere 应用性能影响因素

1.3.2 性能与应用系统的生命周期

1.3.3 构建高性能应用的角色与任务

1.4 小结

第 2 章 基本性能指标与性能模型

2.1 性能指标

2.1.1 负载指标

2.1.2 运行指标

2.1.3 资源占用指标

2.1.4 各指标之间的关系

2.2 理论分析

2.2.1 理论模型与实际问题

2.2.2 实例分析:漏斗模型

2.3 缓存技术与性能模型

2.3.1 提升系统性能的途径

2.3.2 WebSphere 动态高速缓存技术

2.3.3 动态高速缓存性能模型

2.3.4 WebSphere 6.1 对动态高速缓存的改进

2.4 小结

第 2 部分 技术篇

第 3 章 WebSphere 应用性能规划

3.1 性能规划的一般过程

3.1.1 理解应用环境

3.1.2 系统负载分析

3.1.3 软件结构中的性能设计

3.1.4 硬件结构中的性能设计

3.2 拓扑结构设计

3.2.1 WebSphere 应用拓扑结构

3.2.2 实例分析:电子商务应用拓扑结构设计

3.3 系统容量规划

3.3.1 容量规划的范围

3.3.2 CPU 容量规划的理论模型

3.3.3 实例分析:电子商务应用容量规划

3.4 小结

第 4 章 WebSphere 高性能编程

4.1 MVC 结构与高性能编程

4.1.1 MVC 结构

4.1.2 电子商务应用分层结构

4.1.3 提高性能的一般原则

4.2 控制层

4.2.1 一般性建议

4.2.2 电子商务应用最佳实践

4.3 模型层

4.3.1 一般性建议

4.3.2 电子商务应用最佳实践

4.4 视图层

4.5 其他最佳实践

4.5.1 内存使用

4.5.2 数据软删除

4.5.3 缓存与滞后取

4.5.4 数据库编程

4.6 小结

第 5 章 WebSphere 应用性能测试

5.1 性能测试概述

5.1.1 性能测试的一般方法

5.1.2 性能测试的一般流程

5.2 电子商务应用性能测试

5.2.1 制定测试计划

5.2.2 执行测试

5.2.3 管理测试资产

5.2.4 常见问题处理

5.3 性能测试工具

5.3.1 常见性能测试工具

5.3.2 选择负载测试工具

5.3.3 测试工具发展趋势

5.4 小结

第 6 章 企业级应用性能监视

6.1 性能监视概述

6.1.1 监视对象与监视策略

6.1.2 监视级别

6.2 操作系统监视

6.2.1 nmon

6.2.2 top 和 topas

6.2.3 vmstat 和 iostat

6.2.4 typeperf

6.2.5 zVM 监视

6.3 WebSphere 应用服务器监视

6.3.1 Tivoli 性能查看器

6.3.2 高速缓存监视器

6.4 数据库服务器监视

6.4.1 DB2 性能监视

6.4.2 Oracle 监视

6.5 生产环境性能监视

6.5.1 Tivoli 产品家族

6.5.2 ITCAM 监视工具

6.6 小结

第 7 章 性能问题分析与诊断

7.1 性能问题诊断的一般过程

7.1.1 自顶向下分析与自底向上分析

7.1.2 电子商务应用的问题诊断过程

7.2 WebSphere 应用日志分析

7.2.1 Web 服务器日志

7.2.2 应用服务器日志

7.2.3 数据库服务器日志

7.2.4 日志分析工具

7.3 WebSphere 应用程序运行剖析

7.3.1 Heap 分析

7.3.2 JInsight

7.3.3 TPTP 分析平台

IBM Support Assistant Workbench 4.1

http://jerome-wang.iteye.com/blog/940370

isa.wb.412-win32.zip

7.3.4 ITCAM

7.4 小结

第 8 章 WebSphere 应用性能参数调优

8.1 参数调优概述

8.1.1 一般过程

8.1.2 基本原则

8.1.3 参数调优与性能测试

8.2 电子商务应用经验参数

8.2.1 操作系统调优参数

8.2.2 Web 服务器调优参数

8.2.3 数据库服务器调优参数

8.2.4 应用服务器调优参数

8.2.5 硬件配置

8.3 性能参数调优实例介绍

8.4 小结

第 3 部分 实践篇

第 9 章 死锁问题实例分析

9.1 死锁的原理

9.1.1 抽象死锁原理

9.1.2 DB2 锁管理机制

9.2 死锁问题处理的一般过程

9.2.1 发现死锁

9.2.2 解决死锁

9.3 常见死锁问题处理实例

9.3.1 RUNSTATS

9.3.2 缺少索引

9.3.3 SQL 语句不合理

9.3.4 资源访问顺序问题

9.3.5 隔离级别问题

9.3.6 意外更新记录

9.4 小结

第 10 章 内存使用问题实例分析

10.1 WebSphere 内存管理

10.1.1 Java 虚拟机与垃圾回收机制

10.1.2 WebSphere 应用中的 JVM 内存管理

10.2 WebSphere 内存问题分析

10.2.1 内存问题分析的一般过程

10.2.2 垃圾回收分析工具

10.3 常见内存问题实例

10.3.1 JVM 堆大小问题

10.3.2 固定对象问题

10.3.3 大对象问题

10.3.4 缓存大小问题

10.3.5 内存泄漏问题

10.4 小结

第 11 章 性能下降问题实例分析

11.1 性能下降问题

11.1.1 常见现象和产生原因

11.1.2 分析和解决过程

11.2 自顶向下分析实例

11.2.1 问题背景

11.2.2 自顶向下分析过程

11.3 数据库引起的性能下降问题实例

11.3.1 问题背景

11.3.2 分析与解决过程

11.4 小结

第 12 章 动态高速缓存实例分析

12.1 动态高速缓存设计

12.1.1 基本缓存策略

12.1.2 整页缓存与片段缓存

12.1.3 命令缓存

12.1.4 磁盘缓存

12.1.5 外部缓存

12.1.6 失效处理

12.1.7 缓存复制

12.2 实例分析:B2C 网站动态高速缓存的设计与实现

12.2.1 缓存需求分析

12.2.2 整页缓存:产品目录页

12.2.3 片段缓存:迷你购物车

12.2.4 命令缓存:组织查询

12.2.5 缓存配置参数设计

12.2.6 缓存部署与验证

12.2.7 缓存预加载机制

12.3 动态高速缓存常见问题处理

12.3.1 页面内容重复

12.3.2 缓存内容错误

12.3.3 JVM 内存不足

12.3.4 磁盘 I/O 导致性能下降

12.4 小结

附录 A 测试工具介绍

附录 B 操作系统监视工具介绍

附录 C 动态高速缓存辅助资料

参考文献

术语表

http://www.china-pub.com/39913&ref=xilie

 

WAS 性能优化分析工具

Thread Dump Analyzer 2.0    https://tda.dev.java.net/

http://jinwoohwang.ulitzer.com/

WAS HeapDump 分析工具

heapdump1654900.1272355258.phd 文件

javacore1654900.1272355269.txt文件

ga395.zip

I:\IBM_WAS\IBMToolsForHeadDump\IBMGarbageCollectorAnalysis

http://dl.iteye.com/topics/download/a62e5432-0b4a-3fa0-9e50-c06b2a005520

ha398.zip

分析如:heapdump1654900.1272355258.phd 文件

I:\IBM_WAS\IBMToolsForHeadDump\IBMHeapAnalyzer26

http://dl.iteye.com/topics/download/8ce3d729-0a20-32ff-ba69-9b9db2185ef7

jca395.zip / jca436.jar / jca452.jar

分析如:javacore1654900.1272355269.txt文件

I:\IBM_WAS\IBMToolsForHeadDump\IBMThreadAnalyser27

http://dl.iteye.com/topics/download/fc303099-9e9f-3ee8-86fb-5824eaeead5d

D:\Analysis>java -Xmx2048m -jar jca436.jar
Starting ...
java.io.FileNotFoundException: jca.properties.xml (系统找不到指定的文件。)

        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:120)
        at java.io.FileInputStream.<init>(FileInputStream.java:79)
        at com.ibm.jinwoo.thread.Analyzer.getProperties(Analyzer.java:4846)
        at com.ibm.jinwoo.thread.Analyzer.initialize(Analyzer.java:5659)
        at com.ibm.jinwoo.thread.Analyzer.<init>(Analyzer.java:373)
        at com.ibm.jinwoo.thread.Analyzer.main(Analyzer.java:5974)

IBM WebSphere Commerce setup

wcs 部署工具 wcdd ?

IBM WebSphere Commerce Version 6.0 operating system prerequisites

http://www-01.ibm.com/support/docview.wss?uid=swg27007429#Linuxx

inux on xSeries and other Intel processor
based systems
(32 bit kernel) WebSphere Commerce requires one of the following operating systems:

Red Hat Enterprise Linux 5 Server/Advanced Platform
Ensure the following packages are available on the system:
  • compat-libstdc++-33 3.2.3-61
  • compat-db 4.2.52-5.1
  • libXp 1.0.0-8
  • rpm-build 4.4.2-37.el5
  • glibc 2.5-12
  • ksh 20060214-1.4
Ensure you install WebSphere Commerce Version 6.0.0.5 or higher.

 

 

=================================================================

IBM WebSphere Commerce Cluster Server 启停顺序
一,停止:
{was-home}/AppServer/profiles/EMALL/bin:
./stopServer.sh server1(要带server 服务名)
./stopNode.sh
{was-home}/AppServer/profiles/Dmgr01/bin:
./stopmanager.sh
二,启动:
root用户
{was-home}/AppServer/profiles/Dmgr01/bin:
./startManager.sh
wcsuser用户
{was-home}/AppServer/profiles/EMALL/bin:
./startNode.sh
./startServer.sh server1(或者通过控制台启动)
=================================================================

 

122.96.152.205

http://www.xxx.cn/cachemonitor /

WebSphere Application Server 高速缓存监视器徽标

高速缓存统计信息
边缘统计信息
高速缓存内容
相关性标识
磁盘卸载
高速缓存策略

WebSphere Commerce 6.0中的动态高速缓存定制

http://www.ibm.com/developerworks/cn/websphere/library/techarticles/0608_zhusa/index.html

级别: 中级

朱 书安 (zhushuan@cn.ibm.com ), IBM中国软件开发中心,软件工程师
樊 宁 (fanning@cn.ibm.com ), IBM中国软件开发中心,实习生
邓 佰臣 (dengbc@cn.ibm.com ), IBM中国软件开发中心,高级软件工程师

2006 年 9 月 27 日

本文通过举例详细介绍如何在WebSphere Commerce 6.0中动态高速缓存JSP文件。

在 WebSphere Application Server V6 中配置和使用 Web Service 缓存

http://www.ibm.com/developerworks/cn/webservices/0710_yinrui/

级别: 中级

瑞 尹 (yinrui@cn.ibm.com ), IBM SOA design Center,软件工程师

2007 年 10 月 25 日

当 前影响 Web Service 广泛使用的一个重要因素就是 Web Service 的效率较差,WAS V6(WebSphere Application Server V6)的动态缓存服务(Dynamic Cache Service)功能可以提高 Web Service 的性能,从而在一定程度上解决该问题。本文讲述 WAS V6 中的动态缓存服务如何支持 Web Service 缓存,并用具体例子说明如何在 WAS V6 中配置和使用 Web Service 缓存。

提高WebSphere Portal性能的捷径-- 充分利用动态高速缓存技术

http://www.webspherechina.net/club/viewthread.php?tid=4553

 

 

 

WebSphere Commerce 6.0中的动态高速缓存定制

http://www.ibm.com/developerworks/cn/websphere/library/techarticles/0608_zhusa/index.html

1 引言

WebSphere Commerce(以下简称WC)6.0可以利用WebSphere Application Server(以下简称WAS)6.0动态高速缓存服务来高速缓存servlet或JSP文件。

服务器上的大多数HTTP请求都是针对产品目录信息的。WC 6.0命令接收到请求后从数据库中检索信息,并将结果显示为JSP 页面。当客户单击某链接查看产品或产品类别页面时,WC 6.0应用大部分时间都用于分析 HTTP 请求、访问数据库和动态创建页面。较大的站点流量和数据库中大量的产品和类别信息会增加装入servlet或JSP文件所用的时间。

如果自上一次查看以来,产品目录信息没有更改,则下一次客户请求时WC 6.0应用不需要重新执行servlet或JSP文件。提供已存储在高速缓存中的等价静态servlet或JSP文件将更加快捷。通过在位于Web模块的 WEB-INF目录中的cachespec.xml文件中定义高速缓存条目元素和相应规则,可构造servlet或JSP的高速缓存。如果该高速缓存条目 不在内存中,则它会在第一次访问请求发生时动态生成。然后此页面将存储到内存中,在其所依据的数据被修改之前此页面不必重新生成。

在此,我们通过一个具体的例子来介绍如何在WC 6.0中高速缓存高级 B2B 直销原型商店产品目录JSP页面。

 

Commerce  Capability

http://www.iteye.com/problems/10677

统计websphere的几个主要性能参数:
平均响应时间;
JVM的内存使用情况;
每分钟的请求数;
WebApplication or EJB or Application 的可用性;

 

参考

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.javadoc.doc/public_html/mbeandocs/index.html 

 

 

WebApplication or EJB or Application 的可用性:
    Application MBean
        WebSphere:*,type=Application

    EJBModule MBean
        WebSphere:*,type=EJBModule,j2eeType=EJBModule

    Server MBean
        WebSphere:*,type=Server,j2eeType=J2EEServer
    检查Notifications :j2ee.state.starting, j2ee.state.running, j2ee.state.stopping, j2ee.state.stopped, j2ee.state.failed

JVM的内存使用情况:
    JVM Bean
        WebSphere:*,type=JVM,j2eeType=JVM

每分钟的请求数
    ORB MBean
        WebSphere:*,type=ORB,j2eeType=RMI_IIOPResource

 

 

 

如何定位某个线程内存空间申请大对象?

http://microjava.iteye.com/blog/546339

 

在服务器上增加内存申请跟踪的阈值环境变量,跟踪一下大内存申请的类。
ALLOCATION_THRESHOLD 这是环境变量里的参数,用来记录跟踪内存申请的状况。

 

$ export ALLOCATION_THRESHOLD=500000
$ echo $ALLOCATION_THRESHOLD
500000

 

官方文档:
http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg21236523

问题

当您进行分析Java Heap内存碎片和内存泄漏问题时,经常会发现大对象内存频繁申请,会直接导致应用服务器的崩溃。那么我们如何来定位由哪个应用模块的哪个Class类的哪个方法直接导致大对象的产生,从而导致服务器宕机?


解决方案
自从IBM SDK 1.3.1 Sovereign Service Release 10 以后的版本 (或构建日期2006年5月5日以后) 和 IBM SDK 1.4.2 Sovereign Service Release 4以后的版本,我们可以设置环境变量ALLOCATION_THRESHOLD 来定义内存申请的上限值。
如果内存对象申请的大小超过此上限,Java虚拟机会自动打印出类似与Java Exception 异常堆栈日志信息的类方法诊断信息,来定位到底是由哪个对象的哪个方法向内存申请了大对象空间。

输出日志类似:
Allocation request for bytes
at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
at org.apache.xerces.impl.XMLEntityScanner.skipString(Unknown Source)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source)

如果您把ALLOCATION_THRESHOLD环境变量设置为nnn (bytes), 一旦应用申请对象的大小大于nnn (bytes)时, 当前运行线程的Java类方法调用级联堆栈信息就会自动打印到native_stderr.log日志文件中了。

比如以下测试案例代码:

Java代码  收藏代码
  1. import  java.io.*;  
  2. public   class  largeobj {  
  3. static   int  limit =  20 ;  
  4. static   int  size1 =  1000000 ;  
  5. static   int  size2 = 2 *size1;  
  6. public   static   void  main(String []args)  throws  IOException {  
  7. for  ( int  index0= 0 true ; index0++) {  
  8. if  ( 0  == index0 %  100 ) System.out.println(index0);  
  9. ByteArrayOutputStream bos = new  ByteArrayOutputStream();  
  10. ObjectOutputStream oos = new  ObjectOutputStream(bos);  
  11. oos.writeObject(String.class );  
  12. oos.close();  
  13. Object array1 = null ;  
  14. for ( int  i1= 0 ; i1 System.out.println( ""  + i1);  
  15. array1 = new  Object ;  
  16. for  ( int  i2= 0 ; i2 array1 =  new  Object;  
  17. }  
  18. }  
  19. array1=null ;  
  20. }  
  21. }  
  22. }  
import java.io.*;
public class largeobj {
static int limit = 20;
static int size1 = 1000000;
static int size2 =2*size1;
public static void main(String []args) throws IOException {
for (int index0=0; true; index0++) {
if (0 == index0 % 100) System.out.println(index0);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(bos);
oos.writeObject(String.class);
oos.close();
Object array1 = null;
for(int i1=0; i1 System.out.println("" + i1);
array1 = new Object ;
for (int i2=0; i2 array1 = new Object;
}
}
array1=null;
}
}
}



如果您把JVM运行的环境变量设置如下:
export ALLOCATION_THRESHOLD=5000000

当申请对象的大小超过设定的上限值时,那您会获得以下打印日志信息:

Allocation request for 8000016 bytes
at largeobj.main(largeobj.java:18)

同样您也可以在WebSphere Application Server V5.1.1 and V6.0以后的版本中,设置ALLOCATION_THRESHOLD环境变量。


关于如何在WebSphere Application Server V5.1.1 and V6.0以后版本的服务器中设置ALLOCATION_THRESHOLD环境变量,请参考以下步骤:

WebSphere Application Server 6.0
可以通过在WebSphere Application Server versions 6.0 and 6.0.1的管理控制台中,按照以下步骤加入对应的环境变量:
1、 打开WebSphere Web管理控制台。
2、选择 Servers > Application Servers > server_name > Java and Process Management > Process Definition > Environment Entries > New.
3、 如果您使用WebSphere Application Server 6.0.2以后的版本, 按照如下顺序选择进入: Application servers > server_name > (Expand Java and Process Management) > Process Definition > Custom Properties
4、 增加以下名称和对应的值:
Name: ALLOCATION_THRESHOLD
Value: value
5、 最后确认新增配置的保存,再重新启动应用服务器。


WebSphere Application Server 5.1.1
可以通过在WebSphere Application Server versions 5.1.1的管理控制台中,按照以下步骤加入对应的环境变量:
1、 打开WebSphere Web管理控制台。
2、 选择 Servers > Application Servers > server_name > Process Definition > Environment Entries > New.
3、 增加以下名称和对应的值:
Name: ALLOCATION_THRESHOLD
Value: value
4、 最后确认新增配置的保存,再重新启动应用服务器。

 

获取windows所有的性能计数器

C:\Documents and Settings\Administrator>perfmon
C:\Documents and Settings\Administrator>perfmon.msc

C:\Users\Administrator>typeperf
缺少参数: <counter [counter ...]>
缺少参数: -cf <filename>
缺少参数: -q [object]
缺少参数: -qx [object]

命令的语法不正确。

C:\Users\Administrator>typeperf  /?

Microsoft ® TypePerf.exe (6.1.7600.16385)

Typeperf 将性能数据写入命令窗口或日志文件。要停止 Typeperf,请按 CTRL+C.

用法:
typeperf { <counter [counter ...]> | -cf <filename> | -q [object]
                                | -qx [object] } [options]

参数:
  <counter [counter ...]>       要监视的性能计数器。

选项:
  -?                            显示跟上下文相关的帮助。
  -f <CSV|TSV|BIN|SQL>          输出文件格式。默认值是 CSV。
  -cf <filename>                含有监视的性能计数器的文件,一个计数器一行。
  -si <[[hh:]mm:]ss>            示例间的时间。默认值是 1 秒。
  -o <filename>                 输出文件或 SQL 数据库的路径。默认值为 STDOUT。
  -q [object]                   列出已安装的计数器(无实例)。要列出某个对象的
                                计数器,包括对象名,如 Processor。
  -qx [object]                  列出已安装的计数器(带实例)。要列出某个对象的
                                计数器,包括对象名,如 Processor。
  -sc <samples>                 要收集的示例数量。默认值为,在 CTRL+C 之前都
                                进行采样。
  -config <filename>            含有命令选项的设置文件。
  -s <computer_name>            在计数器路径中没有指定服务器的情况下要监视的
                                服务器。
  -y                            不用提示对所有问题都回答 yes。

注意:
  Counter 是性能计数器的全名,格式为
  "\\<Computer>\<Object>(<Instance>)\<Counter>";
  例如 "\\Server1\Processor(0)\% User Time"。

示例:
  typeperf "\Processor(_Total)\% Processor Time"
  typeperf -cf counters.txt -si 5 -sc 50 -f TSV -o domain2.tsv
  typeperf -qx PhysicalDisk -o counters.txt

http://niyunjiu.iteye.com/blog/322879

C:\Users\07121038> typeperf –qx

http://support.microsoft.com/kb/934809

C:\Users\07121038> typeperf-f CSV-cf counters.txt-si 15-sc 5760-o OutputFile -y

 

利用typeperf工具收集SQL Server性能数据

http://xiaoer-1982.iteye.com/blog/497786

一.利用 TypePerf.exe 命令行工具把 Windows 操作系统的性能计数器数据记录到数据库中 <?XML:NAMESPACE PREFIX = O />

 

可以在作业中建立以下脚本

1. 启用 xp_cmdshell

-- 默认情况下 ,sql server2005 安装完后 ,xp_cmdshell 是禁用的 ( 可能是安全考虑 ), 如果要使用它 , 可按以下步骤

 

-- 允许配置高级选项

EXEC sp_configure 'show advanced options' , 1

GO

-- 重新配置

RECONFIGURE

GO

-- 启用 xp_cmdshell

EXEC sp_configure 'xp_cmdshell' , 1

GO

-- 重新配置

RECONFIGURE

GO

 

2. 定时开启, 开始记录性能计数器日志

-- 实现的功能:将 “MyCounters.txt” 文件中列出的计数器,按照每秒钟的时间间隔,记录到 SQL 数据库中 ,"SQL:SystemLog!TestSystemLog" ODBC 数据源建立的系统 DSN

EXEC xp_cmdshell 'typeperf -cf c:\MyCounters.txt -si 5 -f SQL -o SQL:SystemLog!TestSystemLog'

 

--"MyCounters.txt" 可以利用下面的命令在 CMD 命令窗口中执行后生成

TYPEPERF - qx "Processor" >> c: \MyCounters. txt

 

3. 定时关闭

-- 结束 typeperf.exe 的进程

EXEC xp_cmdshell 'tskill typeperf'

 

4. 关闭 xp_cmdshell

-- 用完后 , 要记得将 xp_cmdshell 禁用 ( 出于安全考虑 )

-- 允许配置高级选项

EXEC sp_configure 'show advanced options' , 1

GO

-- 重新配置

RECONFIGURE

GO

-- 禁用 xp_cmdshell

EXEC sp_configure 'xp_cmdshell' , 0

GO

-- 重新配置

RECONFIGURE

GO

 

5. 利用数据库中记录的日志分析性能数据

 

二.带来的好处:

1. 可以根据计划定时抓取 服务器性能数据 包括 CPU 、内存和磁盘利用率以及 SQL Server 特定数据。为数据库服务器的性能分析提供帮助。

 

2. 可以根据数据库中记录的日志结合 Reporting Service 绘制性能分析的报表。

 

 

3. 可以定制作业实现自动化

 

 

三.带来的影响:

1. 会增加服务器的负载,在测试时观察了一下这个命令的开销,基本上启动后 8M 左右的内存运行,开销比较小

 

另外:如果考虑实施的话,可以新建一个数据库(专门用于监控服务器性能等的表),便于维护和管理

TypePerf收集服务器性能

http://yangzhiyong77.iteye.com/blog/1413446

TypePerf.exe这个命令行工具可以收集服务器性能数据

--1.查找和数据库JinRiDomesticOrder相关的性能参数

TYPEPERF -qx "SQLServer:Databases" | FIND "testr"


--2.查找和数据库JinRiDomesticOrder相关的性能参数并导出

TYPEPERF -qx "SQLServer:Databases" | FIND "test" >>s:\perf.txt

--3.perf.txt这个文本文件中读取计数器信息,将技术器数值写入到perf.csv文件中,每隔10秒钟执行一次,共执行600次

TYPEPERF -f CSV -o s:\perf.csv -si 10 -cf s:\perf.txt -sc 600

C:\Users\07121038>typeperf /?

  Counter 是性能计数器的全名,格式为
  "\\<Computer>\<Object>(<Instance>)\<Counter>";
  例如 "\\Server1\Processor(0)\% User Time"。

示例:
  typeperf "\Processor(_Total)\% Processor Time"
  typeperf -cf counters.txt -si 5 -sc 50 -f TSV -o domain2.tsv
  typeperf -qx PhysicalDisk -o counters.txt

 

 

end

 

 

IBM Support Assistant Data Collector

http://public.dhe.ibm.com/software/isa/isadc/2.0/isacoreweb/2.0.1/isadc/lang/zh/index.html?taxonomy=ApplicationServer

 

MustGather: Performance, hang, or high CPU issues on Linux (linperf.sh)
http://www-01.ibm.com/support/docview.wss?uid=swg21115785

http://www-01.ibm.com/support/docview.wss?uid=swg21115785&aid=1

http://dl.iteye.com/topics/download/00428b99-871a-310a-a058-9a6ee72dda07
MustGather: Performance, hang, or high CPU issues on AIX (aixperf.sh)
http://www-01.ibm.com/support/docview.wss?uid=swg21052641

用法:[lindows@Loadrunner19 ~]$ ./linperf.sh  17909          (17909 ---- java进程号)
文件:linperf.sh

Shell代码 
  1. ###############################################################################  
  2. #  
  3. # This script is used to collect data for   
  4. 'MustGather: Performance, Hang or High CPU Issues on Linux'  
  5. #  
  6. # ./linperf.sh [PID(s)_of_the_problematic_JVM(s)_separated_by_spaces]  
  7. #  
  8. SCRIPT_VERSION=2011.05.03  
  9. #  
  10. ###############################################################################  
  11. #                        #  
  12. # Variables              #   
  13. #                        #  
  14. ##########################  
  15. SCRIPT_SPAN=240          # How long the whole script should take. Default=240  
  16. JAVACORE_INTERVAL=120    # How often javacores should be taken. Default=120  
  17. TOP_INTERVAL=60          # How often top data should be taken. Default=60  
  18. TOP_DASH_H_INTERVAL=5    # How often top dash H data should be taken. Default=5  
  19. VMSTAT_INTERVAL=5        # How often vmstat data should be taken. Default=5  
  20. ###############################################################################  
  21. # * All values are in seconds.  
  22. # * All the 'INTERVAL' values should divide into the 'SCRIPT_SPAN' by a whole   
  23. #   integer to obtain expected results.  
  24. # * Setting any 'INTERVAL' too low (especially JAVACORE) can result in data  
  25. #   that may not be useful towards resolving the issue.  This becomes a problem   
  26. #   when the process of collecting data obscures the real issue.  
  27. ###############################################################################  
  28. if [ $# -eq 0 ]  
  29. then  
  30. echo "$0 : Unable to find required PID argument.  Please rerun the script as follows:"  
  31. echo "$0 : ./linperf.sh [PID(s)_of_the_problematic_JVM(s)_separated_by_spaces]"  
  32. exit 1  
  33. fi  
  34. ##########################  
  35. # Create output files    #  
  36. #                        #  
  37. ##########################  
  38. # Create the screen.out and put the current date in it.  
  39. echo > screen.out  
  40. date >> screen.out  
  41.   
  42. # Starting up  
  43. echo $(date) "MustGather>> linperf.sh script starting..." | tee -a screen.out  
  44. echo $(date) "MustGather>> Script version:  $SCRIPT_VERSION." | tee -a screen.out  
  45.   
  46. # Display the PIDs which have been input to the script  
  47. for i in $*  
  48. do  
  49.     echo $(date) "MustGather>> PROBLEMATIC_PID is:  $i" | tee -a screen.out  
  50. done  
  51.   
  52. # Display the being used in this script  
  53. echo $(date) "MustGather>> SCRIPT_SPAN = $SCRIPT_SPAN" | tee -a screen.out  
  54. echo $(date) "MustGather>> JAVACORE_INTERVAL = $JAVACORE_INTERVAL" | tee -a screen.out  
  55. echo $(date) "MustGather>> TOP_INTERVAL = $TOP_INTERVAL" | tee -a screen.out  
  56. echo $(date) "MustGather>> TOP_DASH_H_INTERVAL = $TOP_DASH_H_INTERVAL" | tee -a screen.out  
  57. echo $(date) "MustGather>> VMSTAT_INTERVAL = $VMSTAT_INTERVAL" | tee -a screen.out  
  58.   
  59. # Collect the user currently executing the script  
  60. echo $(date) "MustGather>> Collecting user authority data..." | tee -a screen.out  
  61. date > whoami.out  
  62. whoami >> whoami.out 2>&1  
  63. echo $(date) "MustGather>> Collection of user authority data complete." | tee -a screen.out  
  64.   
  65. # Create some of the output files with a blank line at top  
  66. echo $(date) "MustGather>> Creating output files..." | tee -a screen.out  
  67. echo > vmstat.out  
  68. echo > ps.out  
  69. echo > top.out  
  70. echo $(date) "MustGather>> Output files created:" | tee -a screen.out  
  71. echo $(date) "MustGather>>      vmstat.out" | tee -a screen.out  
  72. echo $(date) "MustGather>>      ps.out" | tee -a screen.out  
  73. echo $(date) "MustGather>>      top.out" | tee -a screen.out  
  74. for i in $*  
  75. do  
  76.     echo > topdashH.$i.out  
  77.     echo $(date) "MustGather>>      topdashH.$i.out" | tee -a screen.out  
  78. done  
  79.   
  80. ###############################################################################  
  81. #                       #  
  82. # Start collection of:  #  
  83. #  * top                #  
  84. #  * top dash H         #  
  85. #  * vmstat             #  
  86. #                       #  
  87. #########################  
  88. # Start the collection of top data.  
  89. # It runs in the background so that other tasks can be completed while this runs.  
  90. echo $(date) "MustGather>> Starting collection of top data..." | tee -a screen.out  
  91. date >> top.out  
  92. echo >> top.out  
  93. top -bc -d $TOP_INTERVAL -n `expr $SCRIPT_SPAN / $TOP_INTERVAL + 1` >> top.out 2>&1 &  
  94. echo $(date) "MustGather>> Collection of top data started." | tee -a screen.out  
  95.   
  96. # Start the collection of top dash H data.  
  97. # It runs in the background so that other tasks can be completed while this runs.  
  98. echo $(date) "MustGather>> Starting collection of top dash H data..." | tee -a screen.out  
  99. for i in $*  
  100. do  
  101.     date >> topdashH.$i.out  
  102.     echo >> topdashH.$i.out  
  103.     echo "Collected against PID $i." >> topdashH.$i.out  
  104.     echo >> topdashH.$i.out  
  105.     top -bH -d $TOP_DASH_H_INTERVAL -n `expr $SCRIPT_SPAN / $TOP_DASH_H_INTERVAL + 1` -p $i >> topdashH.$i.out 2>&1 &  
  106.     echo $(date) "MustGather>> Collection of top dash H data started for PID $i." | tee -a screen.out  
  107. done  
  108.   
  109. # Start the collection of vmstat data.  
  110. # It runs in the background so that other tasks can be completed while this runs.  
  111. echo $(date) "MustGather>> Starting collection of vmstat data..." | tee -a screen.out  
  112. date >> vmstat.out  
  113. vmstat $VMSTAT_INTERVAL `expr $SCRIPT_SPAN / $VMSTAT_INTERVAL + 1` >> vmstat.out 2>&1 &  
  114. echo $(date) "MustGather>> Collection of vmstat data started." | tee -a screen.out  
  115.   
  116. ################################################################################  
  117. #                       #  
  118. # Start collection of:  #  
  119. #  * javacores          #  
  120. #  * ps                 #  
  121. #                       #  
  122. #########################  
  123. # Initialize some loop variables  
  124. n=1  
  125. m=`expr $SCRIPT_SPAN / $JAVACORE_INTERVAL`  
  126.   
  127. # Loop  
  128. while [ $n -le $m ]  
  129. do  
  130.       
  131.     # Collect a ps snapshot: date at the top, data, and then a blank line  
  132.     echo $(date) "MustGather>> Collecting a ps snapshot..." | tee -a screen.out  
  133.     date >> ps.out  
  134.     ps -eLf >> ps.out 2>&1  
  135.     echo >> ps.out  
  136.     echo $(date) "MustGather>> Collected a ps snapshot." | tee -a screen.out  
  137.       
  138.     # Collect a javacore against the problematic pid (passed in by the user)  
  139.     # Javacores are output to the working directory of the JVM; in most cases this is the <profile_root>  
  140.     echo $(date) "MustGather>> Collecting a javacore..." | tee -a screen.out  
  141.     for i in $*  
  142.     do  
  143.         kill -3 $i >> screen.out 2>&1  
  144.         echo $(date) "MustGather>> Collected a javacore for PID $i." | tee -a screen.out  
  145.     done  
  146.       
  147.     # Pause for JAVACORE_INTERVAL seconds.  
  148.     echo $(date) "MustGather>> Continuing to collect data for $JAVACORE_INTERVAL seconds..." | tee -a screen.out  
  149.     sleep $JAVACORE_INTERVAL  
  150.       
  151.     # Increment counter  
  152.     n=`expr $n + 1`  
  153.   
  154. done  
  155.   
  156. # Collect a final javacore and ps snapshot.  
  157. echo $(date) "MustGather>> Collecting the final ps snapshot..." | tee -a screen.out  
  158. date >> ps.out  
  159. ps -eLf >> ps.out 2>&1  
  160. echo >> ps.out  
  161. echo $(date) "MustGather>> Collected the final ps snapshot." | tee -a screen.out  
  162.   
  163. echo $(date) "MustGather>> Collecting the final javacore..." | tee -a screen.out  
  164. for i in $*  
  165. do  
  166.     kill -3 $i >> screen.out 2>&1  
  167.     echo $(date) "MustGather>> Collected the final javacore for PID $i." | tee -a screen.out  
  168. done  
  169. ################################################################################  
  170. #                       #  
  171. # Other data collection #  
  172. #                       #  
  173. #########################  
  174. echo $(date) "MustGather>> Collecting other data.  This may take a few moments..." | tee -a screen.out  
  175.   
  176. dmesg | grep -i virtual > dmesg.out 2>&1  
  177. df -hk > df-hk.out 2>&1  
  178.   
  179. echo $(date) "MustGather>> Collected other data." | tee -a screen.out  
  180. ################################################################################  
  181. #                       #  
  182. # Compress & Cleanup    #  
  183. #                       #  
  184. #########################  
  185. # Brief pause to make sure all data is collected.  
  186. echo $(date) "MustGather>> Preparing for packaging and cleanup..." | tee -a screen.out  
  187. sleep 5  
  188.   
  189. # Tar the output files together  
  190. echo $(date) "MustGather>> Compressing output files into linperf_RESULTS.tar.gz" | tee -a screen.out  
  191.   
  192. # Build a string to contain all the file names  
  193. FILES_STRING="vmstat.out ps.out top.out screen.out dmesg.out whoami.out df-hk.out"  
  194. for i in $*  
  195. do  
  196.     TEMP_STRING=" topdashH.$i.out"  
  197.     FILES_STRING="$FILES_STRING $TEMP_STRING"  
  198. done  
  199.   
  200. tar -cvf linperf_RESULTS.tar $FILES_STRING  
  201.   
  202. # GZip the tar file to create linperf_RESULTS.tar.gz  
  203. gzip linperf_RESULTS.tar  
  204.   
  205. # Clean up the output files now that they have been tar/gz'd.  
  206. echo $(date) "MustGather>> Cleaning up..."  
  207. rm $FILES_STRING  
  208.   
  209. echo $(date) "MustGather>> Clean up complete."  
  210. echo $(date) "MustGather>> linperf.sh script complete."  
  211. echo  
  212. echo $(date) "MustGather>> Output files are contained within ---->   linperf_RESULTS.tar.gz.   <----"  
  213. echo $(date) "MustGather>> The javacores that were created are NOT included in the linperf_RESULTS.tar.gz."  
  214. echo $(date) "MustGather>> Check the <profile_root> for the javacores."  
  215. echo $(date) "MustGather>> Be sure to submit linperf_RESULTS.tar.gz, the javacores, and the server logs as noted in the MustGather."  
  216. ################################################################################  

 


web server (pick at least 2 web servers)
1.  access log
2.  error log
3.  deflate log (if any)
4.  httpd.conf 
5.  plugin-cfg.xml 
6.  CPU utilization and I/O utilization (something similar to vmstat output)

We should get these files from a couple of web servers (if there are more than 1)

app server (get these files from a couple of application servers, a couple from vertical clones, a couple from horizontal clones)
1.  app config xml
2.  SystemOut.log
3.  SystemErr.log
4.  trace.log
5.  native_stderr.log
6.  Commerce server xml
7.  cachespec.xml
8.  CPU utilization and I/O utilization (something similar to vmstat output)

db server 
1.  db cfg
2.  dbm cfg
3.  if any snapshot (statement, db, for all) taken during load.
4.  CPU utilization and I/O utilization (something similar to vmstat output)

5.  snapshot***.log

文件:get_snapshot.sh

内容:

Shell代码 
  1. i=1  
  2. while [ $i -le 30 ]  
  3. do  
  4.     db2pd -db your_dbname -dyn > get_snapshot.$  
  5. done  

 

选择 WebSphere 性能工具

Rational PurifyPlus

WebSphere Studio 的 J2EE Code Validation Preview

Tivoli Performance Viewer  以图形界面显示了 WebSphere 性能数据(PMI)

WebSphere Thread Analyzer

IBM WebSphere Studio Application Monitor(aka Cyanea/One)

Wily Introscope 和 Quest PerformaSure

Tivoli Monitoring for Transaction Performance 从最终用户角度监视站点的功能

Tivoli(Candle)OMEGAMON® 查看所有服务器的健康状况 //Tivoli  Omegamon  XE for Messaging //MQ监控产品 

WebSphere Studio Application Monitor 负载测试

Jprofiler

JMetter

Thread Dump Analyzer 2.0   

https://tda.dev.java.net/

 

 

http://book.javanb.com/performance-analysis-for-java-web-sites/0201844540_ch12lev1sec2.html

 

如何手工生成dump文件 
一、使用命令
ps -ef | grep java
查询进程PID,找出相应节点的进程标识
二、使用命令
kill -3 进程标识
生成dump文件
三、
到相应的日志节点下去取生成的.phd和txt文件即可

WAS HeapDump 分析工具

heapdump1654900.1272355258.phd 文件

javacore1654900.1272355269.txt文件

heapdump can use by monitoring for mail to somebody .

周彬(周彬) 17:57:49
在这里加两个参数IBM_HEAPDUMPDIR和IBM_JAVACOREDIR,分别指向dump文件和javacore文件的生成路径.

ibm_websphere_heapdump_dir.png

http://dl2.iteye.com/upload/attachment/0096/8931/6069b4a0-5323-3093-b464-3b9b91264dea.png

 

AIX  调出主进程号pid及相关子进程号pid

#ps -mp 5046778 -o THREAD
#Kill -3 5046778 
对几台服务器用ps -mp ******(进程号) -o  THREAD >thread.txt ;kill -3 ******(进程号) 而后,在thread.txt中找到CP最高的若干进程号,转换为十六进制后,在生成的javacore中找到对应的进程的消息。

AIX WebSphere Java应用CPU 异常问题定位 javacore***.txt 文件分析

// 通过 WebSphere JAVA 进程查线程号 
[root@testServer ~]# ps -ef | grep java
// 得到JAVA PID进程号数字,替换下方PID
 

[root@testServer ~]# top -H -p PID -b -n1> dump_high_cpu.txt
// 在这个txt文件可以看到占比比较高的线程号PID,将这个线程号转成16位的
 
(windows--开始--运行--输入calc--计算器算出16位PID表示法)
[root@testServer ~]# kill -3 PID 
// 这个目录下会生成一个javacore文件,用于查找16位pid所在堆栈类做了什么业务操作或线程拥堵等 
[root@testServer ~]# cd /opt/IBM/WebSphere/AppServer/profiles/AppSrv01
[root@testServer ~]# ls -l *.txt
-rw-r--r-- 1 wasadmin wasadmin   3807148 Jun 20 14:52 javacore.20120620.145244.1509.0002.txt
// 然后利用占比较高的十进制线程号转换之后的十六进制数在javacore.20120620.145244.1509.0002.txt文件中找这个线程及定位相关操作实现的代码类

ga395.zip  //主要查看WebSphere GC 是否异常性OOM(Out Of Memeory)或剧烈的/特殊的/异怪的线性图 //分析 Verbosegc.log 日志

I:\IBM_WAS\IBMToolsForHeadDump\IBMGarbageCollectorAnalysis

http://dl.iteye.com/topics/download/a62e5432-0b4a-3fa0-9e50-c06b2a005520

其他gc日志分析工具 gcviewer-1.34-SNAPSHOT.jar / 

http://java.net/projects/gchisto

http://code.google.com/p/gclogviewer

http://akingde.iteye.com/blog/2098600

https://github.com/chewiebug/gcviewer/wiki

http://itindex.net/detail/50646-java-gc-%E6%97%A5%E5%BF%97

Verbosegc.log 详细的GC日志,循环写,文件总数最大20个,每个100000行,在JVM通用参数中。

IBM的SDK中的GC 类型 scavenger和global

一般情况类似这种GC时间totalms耗时达几十秒以上,即表示GC垃圾回收有问题,需分析,如下图

http://dl2.iteye.com/upload/attachment/0095/3696/2fb17ead-846a-39f3-b78a-24fa14654fda.jpg

/opt/IBM/WebSphere/AppServer/profiles/ascpreapp01/logs/ascpreapp01svr01/verbosegc.log.009

http://dl2.iteye.com/upload/attachment/0096/9027/cd84adb3-9f7a-3149-bddd-a8ef66bfb8ed.jpg

 

如何配置 WebSphere Java GC WebSphere_JVM_GC.jpg

WAS控制台 > 应用程序服务器 > hotletuan_svr > 进程定义 > Java 虚拟机 > 通用JVM参数

 

Java代码 
  1. -Xminf0.3 -Xmaxf0.7 -Xgcpolicy:gencon -Xmns256m -Xmnx512m -Xjit:codetotal=131072 -Xverbosegclog:${SERVER_LOG_ROOT}/verbosegc.log,10,10000 -Ddefault.client.encoding=UTF-8 -Dfile.encoding=UTF-8 -Dclient.encoding.override=UTF-8    

http://dl2.iteye.com/upload/attachment/0096/9029/1802c5b1-d57a-3644-9290-f7662d6f5e6c.jpg

 

 

 

如何配置 WebSphere  JVM HEAPDUMP 和 THREADDUMP(JAVACORE)websphere_jvm_heap_thread_dump_configuration.jpg

http://dl2.iteye.com/upload/attachment/0096/9031/7f2d6ff1-8c00-3f00-8255-84767fdf1c69.jpg

 

ha398.zip  //主要查看WebSphere JVM是否大对象Large Object,对象运行状态等 //heapdump***.phd 文件

HeapAnalyzer_ha39.jar.rar

http://dl.iteye.com/topics/download/ec4b3da6-239e-38bd-81a1-091695088816

I:\IBM_WAS\IBMToolsForHeadDump\IBMHeapAnalyzer26

http://dl.iteye.com/topics/download/8ce3d729-0a20-32ff-ba69-9b9db2185ef7

# Aix 6.1 OS HeapDump Operation

# /usr/java6_64/bin/java -Xmx6144m -jar ha26.jar

D:\Analysis>java -Xmx 2048m -jar ha26.jar 
Invalid maximum heap size: -Xmx
Could not create the Java virtual machine.

D:\Analysis>java -Xmx2048m -jar ha435.jar

D:\Analysis>java -version 
java version "1.6.0_25 "
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

http://dl.iteye.com/topics/download/e961755c-ef37-3b6f-8775-33fa4e5ea9f2

jca395.zip  //主要查看WebSphere JAVA线程池是否堵塞哪里堵死等异常 // javacore***.txt 文件 分析方法(见上)

I:\IBM_WAS\IBMToolsForHeadDump\IBMThreadAnalyser27

http://dl.iteye.com/topics/download/ae1b8672-a50e-3176-9148-40f63c37edf8

 

JAVA jvm 生成javacore和heapdump文件 / JVM GC日志和内存DUMP参数配置

http://shuwen.iteye.com/blog/1150002
(1)如果使用Oracle JVM也就是标准的SUN JVM(SUN已被oracle收购)
当内存溢出时生成heapdump文件配置如下
-Xloggc:${目录}/temp_gc.log           (GC日志文件)
-XX:+HeapDumpOnOutOfMemoryError       (内存溢出时生成heapdump文件)
-XX:HeapDumpPath=${目录}              (heapdump文件存放位置)
如果要即时动态生成heapdump文件可以使用jmap命令,jdk6.0已取消了-XX:+HeapDumpOnCtrlBreak配置参数通过ctrl+break的方式。

64位机上使用需要调用参数: jmap -J-d64 -heap pid
/usr/java/jdk1.7.0_25/bin/jmap -dump:format=b,file=temp_heapdump.hprof <pid>

/usr/java/jdk1.7.0_25/bin/jmap -dump:live,file=dump.hprof 进程号 //表示只杀取活动dump,精准定位class对象内存消耗溢出趋势走向。

(2)HP JVM 
-Xverbosegc:file=${目录}/temp_gc.log  (GC日志文件)
-XX:+HeapDumpOnOutOfMemoryError       (内存溢出时生成heapdump文件)
-XX:+HeapDumpOnCtrlBreak              (可以通过ctrl+break组合键动态生成heapdump文件)
-XX:HeapDumpPath=${目录}              (heapdump文件存放位置)
(3)IBM JVM 
非windows操作系统环境中
 
-XverboseGClog: ${目录}/temp_gc.log   (GC日志文件)
-Xdump:heap:events=user,file=${目录}/pid%uid%pid.phd
表示可以根据需要通过kill -3 <pid>产生DUMP文件,%uid和%pid为变量
windows操作系统环境中 
启动wsadmin,进入wsadmin环境
wsadmin> set jvm [$AdminControl completeObjectName type=JVM,process=server1,*]
wsadmin> $AdminControl invoke $jvm generateHeapDump
wsadmin> $AdminControl invoke $jvm dumpThreads

 

UltraEdit-32 获取特定文本段 / 抽取特定文本段 / 筛选 特定文本段   UltraEdit 专业文本/十六进制编辑器 版本 17.30.0.1014

http://lindows.iteye.com/admin/blogs/254296

http://zhidao.baidu.com/question/88947361.html

[wcsuser@b2cprewcs1 server1]$ pwd 
/usr/IBM/WebSphere/AppServer/profiles/EMALL/logs/server1/
[wcsuser@b2cprewcs1 server1]$ ls -l verbosegc.* 
-rw-r----- 1 wcsuser wcs   90325 02-28 22:16 verbosegc.log.001
-rw-r----- 1 wcsuser wcs   48160 02-28 22:19 verbosegc.log.002
-rw-r----- 1 wcsuser wcs   63180 02-28 22:43 verbosegc.log.003
-rw-r----- 1 wcsuser wcs   53194 02-28 22:53 verbosegc.log.004
-rw-r----- 1 wcsuser wcs  971191 02-29 09:11 verbosegc.log.005
-rw-r----- 1 wcsuser wcs   98627 02-29 09:33 verbosegc.log.006
-rw-r----- 1 wcsuser wcs  561729 02-29 13:00 verbosegc.log.007
-rw-r----- 1 wcsuser wcs 3797356 02-28 19:20 verbosegc.log.008
-rw-r----- 1 wcsuser wcs  127462 02-28 21:26 verbosegc.log.009
-rw-r----- 1 wcsuser wcs   53220 02-28 21:37 verbosegc.log.010

需求如下:在verbosegc.log文件里取出类似

文件地址:http://dl.iteye.com/topics/download/2531043a-94c5-30f3-ab7a-ba9d80fd2e46

 

Xml代码
  1. < gc   type = "scavenger"   id = "136003"   totalid = "138060"   intervalms = "3656.446" >   
  2.     < flipped   objectcount = "519386"   bytes = "32542396"   />   
  3.     < tenured   objectcount = "111176"   bytes = "7547616"   />   
  4.     < finalization   objectsqueued = "69"   />   
  5.     < scavenger   tiltratio = "82"   />   
  6.     < nursery   freebytes = "187868904"   totalbytes = "222800384"   percent = "84"   tenureage = "7"   />   
  7.     < tenured   freebytes = "229057848"   totalbytes = "1342177280"   percent = "17"   >   
  8.       < soa   freebytes = "229057848"   totalbytes = "1342177280"   percent = "17"   />   
  9.       < loa   freebytes = "0"   totalbytes = "0"   percent = "0"   />   
  10.     </ tenured >   
  11.     < time   totalms = "111.069"   />   
  12. </ gc >   

 

的所有文本段

"D:\Program Files\IDM Computer Solutions\UltraEdit\Uedit32.exe"

---- open /usr/IBM/WebSphere/AppServer/profiles/EMALL/logs/server1/verbosegc.log.001

---- Ctrl + F

Js代码
  1. <gc type= "scavenger" ?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?+[^r^p^n]?  

 

[^r^p^n]?   表示取下一整行数据

 

ibm_websphere_jvm_verbosegc_ultraedit.jpg

http://dl2.iteye.com/upload/attachment/0096/9041/0e3ef40a-d688-3f51-95be-710a0aff5313.jpg

 

IBM WebSphere 开发者技术期刊: Ruth Willenborg 关于性能工具的提示 

http://www.ibm.com/developerworks/cn/websphere/techjournal/0410_col_willenborg/0410_col_willenborg.html

选择 WebSphere 性能工具

developerWorks
文档
将打印机的版面设置成横向打印模式

 

Ruth Willenborg (rewillen@us.ibm.com ), 团队负责人, IBM WebSphere Application Server Performance

2004 年 11 月 01 日

当今,有许多性能测试的选择,因此对于您需要哪个工具并没有唯一的答案。由于性能对于开发生命周期的每个阶段都是非常重要的,我们将关注一下每个开发阶段的工具需求和选择。
<!-- START RESERVED FOR FUTURE USE INCLUDE FILES--><!-- include java script once we verify teams wants to use this and it will work on dbcs and cyrillic characters --> <!-- END RESERVED FOR FUTURE USE INCLUDE FILES-->

选择 WebSphere 性能工具

五 年前,在 WebSphere® 的较早时期,经常有人问我用什么工具来调试性能问题。答案很简单。在那些日子,我们很幸运的获得一个基础的评测器(profiler),至于查看负载性 能,应用程序中的 JVM 线程堆和打印语句是仅有的资源。今天,答案却是不一样了;目前有许多的选项,每个 Java™ 杂志都包含了许多用于解决性能问题的工具广告。另外,IBM 最近收购的 Candle® 和 Cyanea,都提供了 WebSphere 性能工具,连同现有的 Tivoli®、Rational® 和 WebSphere 现有的功能,您也许会问下面的问题:我从何处开始,我到底需要什么工具,以及所有这些产品之间有什么不同?

当然,对于您需要什么工具,并没有唯一的答案,因此让我们讨论一下不同类型的工具和每个工具解决的首要问题。因为性能在开发周期的每个阶段都是十分重要的,我们来查看一下每个阶段的工具需求,来开始开发。

我 一直推荐选择一个好的代码评测器,并且在应用程序开发过程中使用它。代码评测器帮助鉴别和优化代码,并且在理解对象使用和潜在内存泄露方面真的很有帮助。 进入到“哪个代码评测器最佳”的争论有点像以前“哪个编辑器最好”的争论,因此这里我不想谈论这些。这里也有一个好消息,目前有许多非常好的评测器供 WebSphere 应用程序使用。因为 IBM 收购了 Rational,我的性能团队里面的一些成员每天使用 Rational PurifyPlus™。除了使用代码评测器以外,WebSphere Studio 的 J2EE Code Validation Preview (一个新技术预览)可以针对应用程序的运行来鉴别您的实现中的通用性能和正确性问题。

虽然我一直鼓励评测,但是仍然 存在一些性能问题在开发评测阶段并没有考虑到。例如,常见的可伸缩性问题,包括同步问题和数据库连接,直到负载测试的时候还没有表露。尽早的预料到这些问 题,并且投资一个比较好的环境,越接近于真实环境越好。Web 站点的负载测试工具已经非常的成熟,有许多非常好的工具可供使用。开发负载测试脚本是一项重要的投资,同相关的培训一样,所以在选择负载增强工具以前,一 定要对需求作一个彻底的评估,因为稍后如果转变工具,成本会更高。

一旦您已经转入到一种负载测试环境,就需要观察您 的应用程序,而不仅仅局限在传统评测器提供的范围内。大多数评测器引入了太高的性能花销,因此没有设计用来在高度并发的环境中有效的显示性能数据。因此, 在这个阶段评测性能需要不同的工具。这里有一些 WebSphere 可用的"免费的"工具,对于许多负载测试环境的需求来说它们提供的性能已经足够了。一个是 Tivoli Performance Viewer,与 WebSphere Application Server 打包在一起提供,以图形界面显示了 WebSphere 性能数据(PMI),包含在 WebSphere 资源的信息(比如缓冲池和缓存),J2EE 应用程序度量标准(比如反应时间和请求数目),以及其他基本的系统度量。使用这个数据来决定最可能的瓶颈位置,调整系统,并且推断一些特别慢的和经常被使 用的 servlet 或 EJB 组件,以用于其他的分析以及评测。关于最重要的 10 个度量标准,请参考我的 专家访谈 这篇文章。

如果在评测 PMI 数据以后,仍然没有找到问题所在, JVM 的一些线程堆经常能定位同步方法和其他常见问题。WebSphere Thread Analyzer 已经提供使用并且免费下载,它以视觉上更直观的方式向您展示了线程堆。

Tivoli Performance Viewer 和线程堆可能能满足您的需求,但是如果不是,仍然有一些相当强有力的工具可以供 IBM 和其他厂商使用,能够真正看到负载条件下的应用程序的内部。这些工具,我认为是运行时评测器,提供了对于应用程序耗时位置的细节描述,也经常包含查看特定 SQL 调用下的性能,以及查明内存泄漏的缘由。IBM WebSphere Studio Application Monitor(aka Cyanea/One),以及伙伴工具如 Wily Introscope 和 Quest PerformaSure,提供了这些功能。

虽 然好的负载测试预防了许多产品性能问题,但产品环境经常存在一个难题 -- 特别是对许多不同的交互式应用程序和后端系统引入变更时。具备良好的产品监测策略十分必要。一个 Web 站点监测策略需要从最终用户的角度来查看性能状况,了解 Web 站点内所有系统的健康状况(包括 WebSphere Application Server 以及数据库、目录服务器和其他组件),了解特定应用程序的健康状况。至少,我推荐监测这三个分类的每个部分,包含报表和警告功能。比如 Tivoli Monitoring for Transaction Performance 的一些产品提供了从最终用户角度监视站点的功能。如果要查看所有服务器的健康状况,请考虑使用 Tivoli(Candle)OMEGAMON® 或者类似的厂商解决方案。如果需要其他粒度,上面讨论的关于负载测试的 WebSphere Studio Application Monitor 产品,在生产环境中也是非常有用的。

随着时间的推移,我期待着 Tivoli Monitoring for Transaction Performance、Candle OMEGAMON 和 WebSphere Studio Application Monitor 能有更多显著的集成成果,以提供更加可靠的 WebSphere 产品检测解决方案。另外,我们也期待 Rational 开发和测试解决方案的集成,以提供更多跨生命周期的功能。那时,您就能够根据性能需要选择特定的产品,并将能获得更好的性能。



参考资料



关于作者

Author photo

Ruth Willenborg 是 IBM WebSphere Performance 团队的负责人。她在软件开发方面有 19 年的工作经验,并且是 WebSphere Development Organization 的成员。她与人合著了 Performance Analysis for Java Web Sites (Addison-Wesley,2002 年)一书。

 

 

end

 

 

 

 

 

 

 

 

 

 

 

 

 

 

end 

 

 

 

  • 大小: 20.9 KB
  • 大小: 92.1 KB
  • 大小: 39.5 KB
  • 大小: 165.6 KB
  • 大小: 254 KB
分享到:
评论
1 楼 cht的大摩托 2016-10-09  
学习

相关推荐

    java 开发 IBM WebSphere MQ 最新jar

    Java连接IBM WebSphere MQ 7处理队列信息所需jar包,从安装目录直接打的包。主要包括: /com.ibm.mq.commonservices.jar /com.ibm.mq.defaultconfig.jar /com.ibm.mq.fta.jar /com.ibm.mq.headers.jar /...

    IBM MQ7.5_jar包

    Java连接IBM WebSphere MQ 7处理队列信息所需jar包,从安装目录直接打的包。主要包括: /com.ibm.mq.commonservices.jar /com.ibm.mq.defaultconfig.jar /com.ibm.mq.fta.jar /com.ibm.mq.headers.jar /...

    leptonica-1.71.tar.gz

    /opt/IBM/WebSphere/AppServer/properties:/opt/IBM/WebSphere/AppServer/lib/startup.jar:/opt/IBM/WebSphere/AppServer/lib/bootstrap.jar:/opt/IBM/WebSphere/AppServer/lib/jsf-nls.jar:/opt/IBM/WebSphere/App...

    堆内存对象分析工具ha457.jar

    IBM出的一款堆内存对象分析ha(heap analyser)工具,可以用来分析websphere生成的内存转储phd格式文件。使用方法:java -jar -Xmx1000m ha457.jar

    ha457-2021-5-12.jar.zip

    Download: https://public.dhe.ibm.com/software/websphere/appserv/support/tools/HeapAnalyzer/ha457.jar Open a terminal or command prompt and change directory to where you downloaded the JAR file. Ensure...

    IBM Thread and Monitor Dump Analyzer for Java (jca) 线程分析工具 jca456.jar

    IBM Thread and Monitor Dump Analyzer for Java(简称 jca)。它可以识别Java线程中的挂起,死锁,资源竞争,和瓶颈。 使用方法: java -Xmx1000m -jar jca456.jar

    msbase.jar mssqlserver.jar msutil.jar

    用于创建WebSphere连接数据源。连接时,使用的JAR包。 msbase.jar mssqlserver.jar msutil.jar

    websphere commerce的使用即websphere commerce图解.pdf

    websphere commerce的使用即websphere commerce图解.在网上扒了半天才找到的稀品啊!IBM创建商品店铺(websphere commerce).pdf 一些其他的相关资料: http://www.ibm.com/Search/?q=...

    IBM websphereMQ 8.0.0.5 lib

    IBM websphereMQ 8.0.0.5 lib包; IBM\WebSphere MQ\java\lib下的文件 文件列表: com.ibm.mq.jms.Nojndi.jar com.ibm.mq.pcf.jar com.ibm.mq.allclient.jar com.ibm.mq.postcard.jar com.ibm.mq.axis2.jar ...

    com.springsource.com.ibm.websphere.uow-6.0.2.17.jar

    jar包,官方版本,自测可用

    websphere查看内存溢出工具ha456.jar

    ha456.jar可以准确找到内存溢出位置。

    IBM WebSphere for OS/390 StartNow 万维网服务解决方案

    StartNow 计划通过 IBM 帮助中小型企业更加轻松和成本有效地步入先进的电子业务应用。与 S/390 服务器和业界领先的 OS/390 操作系统的行之有效的优点一起,您可以在需要时获得所需的帮助。在 S/390 上运行的 IBM ...

    IBM HeapAnalyzer 内存分析工具 2014最新版 ha456.jar

    IBM出的一款内存分析工具,可以用来分析websphere生成的内存转储phd格式文件 ...java -jar -Xmx3000m ha456.jar heapdump.20141113.171336.1693.0009.phd 一般这种文件都很大,最好使用64位系统,不然会跑不起来

    IBM堆内存对象分析工具

    IBM出的一款堆内存对象分析ha(heap analyser)工具,可以用来分析websphere生成的内存转储phd格式文件。 使用方法 1.下载ha457.jar 2.java -Xmx4g -jar ha456.jar 3.打开heapdump.phd 4.他就会显示下面的图片,出现...

    IBM websphereMQ 6.0 lib

    CL3Export.jar CL3Nonexport.jar com.ibm.mq.fta.jar com.ibm.mq.jar com.ibm.mq.jms.Nojndi.jar com.ibm.mq.soap.jar com.ibm.mqetclient.jar com.ibm.mqjms.jar commonservices.jar connector.jar dhbcore.jar ...

    com.ibm.mq.jar

    亲测可用 IBM WebSphere MQ 7.5.0 windows版本下载: https://download.csdn.net/download/sunxq/10738544 https://download.csdn.net/download/sunxq/10738692

Global site tag (gtag.js) - Google Analytics