Usage

 Startup

After installation you can start the telnet application with following command line

telnet <TelnetHost> <TelnetPort>

The initial login account is Administrator/sherlok. With the online help, you can get a brief overview on all possible commands and for the command parameters 

 Trace

The trace functions work only, if the monitor is running. The trace may generate an real big amount of data, so its a good practice to 

If an XML output becomes much bigger than 1MB, its not possible to read this with an internet explorer anymore. The same kind of restriction is true for ASCII output, if you want to import this to an spredsheet program.

You can add or remove a trace function from execution and it's possible to run all trace functions in parallel. Trigger functions always terminate after exiting the TriggerPoint method.

 Trace Count

The trace counter counts up the number of method calls after entering the given TriggerPoint method. Call this function before you use any other trigger functions and modify filter and scope for a reasonable output volume.

> start monitor
> start trace
> trace add trigger -c

 Execution Trace

The execution trace allows you to trace all method enter events, starting at the TriggerPoint. This function gives a good start for analysis of foreign applications.

> start monitor
> start trace
> trace add trigger -a

 HotSpot Trigger

The HotSpot Trigger dumps methods, which spend a given time in milliseconds on the stack. This function can help you to find most performance relevant spots in your application. The TriggerPoint is visible at the first entry in the trace output: 

TriggerPoint = com.sapportals.portal.prt.dispatcher.Dispatcher.service

> start monitor
> start trace
> trace add trigger -e100 -tree

 Trace Parameter

The parameter trace shows the method call parameters at method entry. The default for objects is to call the method toString. It's possible call methods of an parameter object, which need no parameters. The entries for this property are separated by semicolon.

TraceMethods = .Dispatcher.service {request.getRequestURI}; .doContent

If you don't specify anything you get all call parameter names and the result for method toString.

 Trace Methods

The method trace shows the enter and exit event for all methods specified in TraceMethods property. It gives as info the CPU time in nanoseconds consumed by the current thread between this two events.

Trace Stack

The stack trace allows you to trigger a thread dump, if the application enters one of the methods specified in TraceMethods property. This feature is useful, if a service causes a damage and you want to figure out, who was calling.

> start monitor
> start trace
> trace add stack

Trace Exeption

The exception trace dumps all unhandled exceptions. If the JVM throws OutOfMemoryError exception, Sherlok requests a full thread dumps and check memory statistics.

> start monitor
> start trace
> trace add exception