When using the normal CA APM Workstation or WebView, I specify a duration for the transaction trace session before it starts, but I can also stop the session or restart it at any time. If I launch a transaction trace session using the CLW, is it possible to stop that transaction trace session before the end of the specified duration ?
APM 9.x, .x Command Line Workstation (CLW)
It is not possible to stop the transaction trace session prematurely when using the CLW. The below examples demonstrate that:
NOTE: The Enterprise Manager was started afresh so there were no existing transaction trace sessions.
1. Run this transaction trace session for 10 minutes:
C:\Program Files\CA APM\Introscope18.104.22.168\lib>java -jar CLWorkstation.jar quietly trace transactions exceeding 1 sec in agents matching (.*) for 600 seconds
We can see in EM log that the session starts:
10/05/15 12:07:50.311 AM EDT Started transaction trace for transactions longer than 1000ms
Stop the CLW Java process and we see it disconnect from the EM:
10/05/15 12:08:04.883 AM EDT Disconnected From: Node=Workstation_7, Address=127.0.0.1/127.0.0.1:50205, Type=socket
However, there is no sign that the transaction trace session stopped.
2. Run a second transaction trace session from CLW for 10 seconds:
C:\Program Files\CA APM\Introscope22.214.171.124\lib>java -jar CLWorkstation.jar quietly trace transactions exceeding 1 sec in agents matching (.*) for 10 seconds
Because it was only 10 seconds, we can quickly see it start and then stop in the EM log:
10/05/15 12:10:40.840 AM EDT Started transaction trace for transactions longer than 1000ms
10/05/15 12:10:50.841 AM EDT Stopped transaction trace for transactions longer than 1000ms. There is now 1 active session.
Notice at the stop time, it tells us that there is still one active session.
3. Only after the full 10 minutes of the first session had elapsed, did that transaction trace session stop and we see now that all sessions have closed.
10/05/15 12:17:50.306 AM EDT Stopped transaction trace for transactions longer than 1000ms. There are now 0 active sessions.
4. Run the CLW interactively (java -jar CLWorkstation.jar -i) with a transaction trace session for 20 seconds, then stop the CLW Java process at 10 seconds. Again in this case, the transaction trace session runs for the originally configured 20 seconds.
In summary a transaction trace session initiated using CLW cannot be stopped before the duration time has elapsed. Therefore we suggest to exercise caution with the length of duration times used when running transaction traces from CLW. Also particularly when running CLW in a scripted format where the command could be issued easily many times, as this could easily lead to a large volume of trace processing which will increase performance overhead on all parts of the product.