How do I run strace or ltrace on Tomcat Catalina?
Posted
by
flashnode
on Server Fault
See other posts from Server Fault
or by flashnode
Published on 2011-01-14T21:00:10Z
Indexed on
2011/01/14
21:55 UTC
Read the original article
Hit count: 260
Running ltrace isn't trivial. This RHEL 5.3 system has based on a Tomcat Catalina (servlet container) which uses text scripts to tie everything together. When I tried to find an executable here's the rabbit hole I went down:
/etc/init.d/pki-ca9 calls dtomcat5-pki-ca9
]# Path to the tomcat launch script (direct don't use wrapper)
TOMCAT_SCRIPT=/usr/bin/dtomcat5-pki-ca9
/usr/bin/dtomcat5-pki-ca9 calls a watchdog program
/usr/bin/nuxwdog -f $FNAME
I replaced nuxwdog with a wrapper
[root@qantas]# cat /usr/bin/nuxwdog
#!/bin/bash
ltrace -e open -o /tmp/ltrace.$(date +%s) /usr/bin/nuxwdog.bak $@
[root@qantas]# service pki-ca9 start
Starting pki-ca9: [ OK ]
[root@qantas]# cat /tmp/ltrace.1295036985
+++ exited (status 1) +++
This is ugly. How do I run strace or ltrace in tomcat?
© Server Fault or respective owner