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

JavaScript Library: extjs 2.0

ajax No Comments »

http://extjs.com/

For a few simple tasks like an accordion menu and a grid I started testing the ExtJS JavaScript library and I have to say, once you get the hang of it, it’s pretty straight forward and helps to achieve results in no time. A few interesting code snippets for the accordion menu can be found here.

Mediawiki: Edit Navigation bar

php No Comments »

In order to edit the Navigation bar on the left, go to the special page MediaWiki:Sidebar as Admin.

Perl: Base64 encoding a string

perl No Comments »

# perl -e 'use MIME::Base64; print encode_base64('mystring');'

Useful Oscommerce contributions

php No Comments »

Products sold per month/year

Purchase without Account

Rechnungslayout über Admin

Featured Products

Google Sitemap Creator

Order Editor

Category Descriptions

Delete Remove Product Image Via Admin

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