Skip to content

Parameters for intrace agent.jar

eostermueller edited this page Aug 9, 2014 · 16 revisions

intrace-agent.jar loads certain parameters when it is launched. The syntax is a bit funky, so this page details some of those parameters and shows how to use them.

Example

The following command launches com.acme.MyProgram and loads intrace-agent.jar into the JVM, so that you can trace method invocations (using headlessInTraceClient).

java -javaagent:c:\mypath\intrace-agent.jar=[gzip-true[exit-stack-trace-true com.acme.MyProgram

Note that two parameters are used:

  1. gzip -- [gzip-true
  2. exit-stack-trace -- [exit-stack-trace-true
  • Each parameter begins with a left-square-bracket
  • The value of each parameter is "-true"

Reference

Below is a table of some intrace-agent.jar parameters. Other parameters can be found in these source files: here or here.

Parameter Description Notes
[out-file-true Logs text of all events to text file. Look for trc?.txt in the folder where java.exe was launched from. To avoid filling up your file system, a primitive logfile rotation is implemented. Once 100k lines are written to trc1.txt, events are written to trc2.txt. Once trc2.txt has 100k lines, text is trc1.txt is wiped out and event logging continues there (trc1.txt).
[gzip-true Compresses the text of each event as it is shipped over the wire
[exit-stack-trace-true The full text of the stack trace of the method invocation will be appended to the 'exit' event. This is very helpful for discovering what code calls a particular method. This adds a ton of text to the end of an event. Obviously, the extra text and exception creation will degrade performance.
[serverport-NNNN Change NNNN to be the TCP port intrace-agent.jar listens on. When not specified, this defaults to 9123. Helpful to change ports when firewall rules get in the way, or when some other program is listening on 9123. headlessInTrace client will need to specify this number.
[callbackport-NNNN intrace-agent.jar will connect back to headlessInTrace client on the port specified by NNNN Helpful to change ports when firewall rules get in the way. headlessInTrace client will need to specify this number.
Clone this wiki locally