Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.4K Development
- 17 Developer Projects
- 139 Programming Languages
- 293.1K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 161 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 473 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
Performance Analysis 怎么用collect -j 收集tomcat上的web项目的性能数据?

Performance Analysis 怎么用collect -j 收集tomcat上的web项目的性能数据?
How to user Performance Analysis collect -j to collect web apps data on tomcat?
Thank you!
Best Answer
-
Could you please explain how you start tomcat?
I guess you start it by running something like this (but I may be wrong):
$CATALINA_HOME/bin/startup.sh
If yes, then you can try to start it under "collect" using the following command:
collect -o /tmp/tomcat.1.er $CATALINA_HOME/bin/startup.sh
It should create the experiment /tmp/tomcat.1.er, start tomcat and profile it until you stop tomcat.
After that you can view the experiment in analyzer:
analyzer /tmp/tomcat.1.er
Please, let us know if you see any problems with this solution.
Thanks.
Nik
Answers
-
Could you please explain how you start tomcat?
I guess you start it by running something like this (but I may be wrong):
$CATALINA_HOME/bin/startup.sh
If yes, then you can try to start it under "collect" using the following command:
collect -o /tmp/tomcat.1.er $CATALINA_HOME/bin/startup.sh
It should create the experiment /tmp/tomcat.1.er, start tomcat and profile it until you stop tomcat.
After that you can view the experiment in analyzer:
analyzer /tmp/tomcat.1.er
Please, let us know if you see any problems with this solution.
Thanks.
Nik
-
如果你用的是studio 12.4,collect可以收集从脚本运行的java程序。
比如如果从一个shell脚本run.sh运行tomcat,那么运行
> collect -j on sh run.sh
就可以采集tomcat运行后所有加载的web项目的数据。
如果你的web项目在某个时间段内运行,而且你只关心这个时间段的数据,你可以通过signal控制数据采集的开始和结束时间。
> collect -j on -y PROF sh run.sh
然后你可以向目标进程(假设进程号是1111)发送SIGPROF signal来开始或暂停数据采集:
> kill -SIGPROF 1111
在Linux上SIGPROF不能用,建议用SIGVTALRM。
如果你用的是solaris,collect 可以附着在正在运行的程序(假设进程号是1111)上:
> collect -j on -P 1111
studio 12.4 页面:
-
I use “collect -o test.1.er sh catalina.sh run”
it's worked
Thank you
-
Great to know that “collect -o test.1.er sh catalina.sh run” works!
Please, let us know if you have any questions or you see any problems.
Thanks.
Nik
-
Thanks for your help. It save me hours of work.
-------------------------------------------
Findflat.hk - 租屋網 搵樓睇