Apparently strace doesn’t play well by default with java.
strace -p pid doesn’t work, for example.
This does, though [follows forks--why necessary, dunno].
You can start it under strace:
$ strace -F -f java Readfiles # where Readfiles.class exists
or (for an already running process)
$ strace -F -p <pid>
ref: http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/html/linux_tools.html
Are you sure about this? I’ve found that you can simply use JPS to get the proc id and then use that as the input to strace:
jjj# JPS
20524 xxxxxx.jar
jjj# strace -o /tmp/output -f -r -p 20524
yeah looks like it’s the little -f that’s required. Seems like JPS should work fine for determining the PID…