Forum Stats

  • 3,734,166 Users
  • 2,246,899 Discussions
  • 7,857,145 Comments

Discussions

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!

Nikmolchanov-Oracle

Best Answer

  • Nikmolchanov-Oracle
    Nikmolchanov-Oracle Member Posts: 81
    Accepted 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

  • Nikmolchanov-Oracle
    Nikmolchanov-Oracle Member Posts: 81
    Accepted 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

  • 930596
    930596 Member Posts: 1

    如果你用的是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 页面:

    Oracle Solaris Studio Performance Analyzer

    puck
  • puck
    puck Member Posts: 2

    I use “collect -o test.1.er sh catalina.sh run”

    it's worked

    Thank you

    Nikmolchanov-Oracle
  • 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

  • 46a2674d-9cbc-4da3-9204-4cf732f7b040
    edited Jan 4, 2015 2:52PM

    Thanks for your help. It save me hours of work.

    -------------------------------------------

    Findflat.hk - 租屋網 搵樓睇

This discussion has been closed.