If you observe CPU being hogged by the Weblogic Server process on a linux machine,
you need to find out the Weblogic Server process id using
ps -ef | grep java
After you’ve found out the process id, find the thread id’s ( light weight process id’s) and their CPU usage using top command.
top -H -p 2389 (Weblogic Server Process Id)
2703 , 2704 & 2705 are the light weight process that are hogging up the CPU.
We take thread dump using kill -3 2389 (Weblogic Server Process Id)
We can map the light weight process to Weblogic Server threads by converting 2703 to hex 0xa8f.
We search for the thread (nid=0xa8f) in the thread dump to know what the thread is doing.
From the stack we can make out some complex mathematical operation is going on.
Inorder to avoid the High CPU we need to change the code to simplify the operation.
“Thread-19” daemon prio=10 tid=0x8a092000 nid=0xa8f runnable [0x887fe000]
at java.lang.StrictMath.pow(Native Method)