Mapping Java Thread ID to the hex id of a stacktrace

java No Comments »

So you generated a stacktrace and also identified the thread which is causing you so much pain but don’t know how to map one to the other? Do it like this:

Find the PID of the java process:

host:/service/activemq/log/main# ps -ef|grep activemq
activemq 24380 20411  0 Mar25 ?        00:02:56 /usr/bin/java -Xmx512M -Dorg.apache.activemq.UseDedicatedTaskRunner=true -Dcom.sun.management.jmxremote -Dactivemq.classpath=/usr/local/activemq/conf; -Dactivemq.home=/usr/local/activemq -Dactivemq.base=/usr/local/activemq -jar /usr/local/activemq/bin/run.jar start

Sort the java threads by consumed CPU time:

host:/service/activemq/log/main# ps -T -p 24380 -o pid,tid,pri,time | grep -v '00:00:00'
PID   TID PRI     TIME
24380 24380  15 00:00:05
24380 24389 24 00:02:37
24380 24407  24 00:00:01

Convert the Thread ID to hex format:

host:/service/activemq/log/main# printf "%X\n" 24389
5F45

Search for the Thread ID (in hex format) in your log:

host:/service/activemq/log/main# grep 5f45 current
@4000000049ceb85c022cfbe4 "VM Thread" prio=1 tid=0x0809b778 nid=0x5f45 runnable

Where to start with Java?

java No Comments »

http://www.cs.indiana.edu/classes/a201-dger/

Thinking in Java (3rd Edition):
http://www.mindview.net/Books/TIJ/

Short introduction to Java:
http://www.cs.indiana.edu/classes/a348-dger/fall2002/notes/Eight.html

Sun intro to Java servlets:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets.html

Ant ssh tasks

java No Comments »

http://ant.apache.org/manual/install.html

http://www.jcraft.com/jsch/index.html

Proxy authentication settings for JRE

java No Comments »

proxies.html

proxie_config.html

C:\Program Files\Java\jre1.5.0_06\lib\net.properties
java.net.useSystemProxies=true
http.proxyHost=10.10.80.10
http.proxyPort=3128
http.nonProxyHosts=localhost|127.0.0.1
http.auth.ntlm.domain=ADOMAIN

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in