If you have a Java application that is consuming CPU when it isn't doing anything, how do you determine what it is doing?

后端 未结 8 1822
没有蜡笔的小新
没有蜡笔的小新 2021-01-01 19:44

I am calling a vendor\'s Java API, and on some servers it appears that the JVM goes into a low priority polling loop after logging into the API (CPU at 100% usage). The sam

相关标签:
8条回答
  • 2021-01-01 20:41

    If JConsole can't be used you can

    • press CTRL+BREAK under Windows
    • send kill -3 <process id> under Linux

    to get a full Thread Dump. This doesn't affect performance and can always be run in production.

    0 讨论(0)
  • 2021-01-01 20:45

    For completeness sake: even though my company more or less standardizes on Eclipse we use Netbeans (6 and up) with its included, free profiler on a daily basis. It works better than the Eclipse TPTP plugin (last checked 3 months ago) and for us it removes any need for a commercial profiler such as JProfiler, which is excellent, but fast becoming unnecessary.

    0 讨论(0)
提交回复
热议问题