DX Application Performance Management

 View Only
Expand all | Collapse all

How to Instrument Introscope Java Agent on WebLogic Windows Server

  • 1.  How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 06, 2016 05:10 PM

    Is there documentation for this? I haven't found it. Our WebLogic admin tried using the doc for Unix platform and it didn't work.

    the agent and APM infra are both v10.1

     

    @REM BAE CSR CRM-471 CA_APM

    SET CA_APM_JAVA_OPTIONS=-javaagent:%ProgramFiles%\CA\APM\Introscope10.1\wily\Agent.jar -Dcom.wily.introscope.agentProfile=%ProgramFiles%\CA\APM\Introscope10.1\wily\core\config\IntroscopeAgent.profile

    SET JAVA_OPTIONS=%JAVA_OPTIONS%  %CA_APM_JAVA_OPTIONS%

     

    SET CA_APM_CLASSPATH=%ProgramFiles%\CA\APM\Introscope10.1\wily\common\WebAppSupport.jar

    SET CLASSPATH=%CLASSPATH% %CA_APM_CLASSPATH%

    @REM END BAE CSR CRM-471 CA_APM

     

    Thanks in advance for helping


    Manish



  • 2.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 06, 2016 06:00 PM

    Manish,

     

    In newer releases, the documentation is only provided online.  Have you tried these steps? 

    Oracle WebLogic - CA Application Performance Management - 10.1 - CA Technologies Documentation



  • 3.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 08, 2016 04:56 PM

    Tim_McGaughey

    Well, that's what I gave the app admin and the response I got was....

     

    Please provide the syntax for Windows to set up the correct JAVA_OPTIONS and CLASSPATH. The below I copied from Linux doesn’t work and can’t start Admin Server.

    @REM BAE CSR CRM-471 CA_APM

    SET CA_APM_JAVA_OPTIONS=-javaagent:%ProgramFiles%\CA\APM\Introscope10.1\wily\Agent.jar -Dcom.wily.introscope.agentProfile=%ProgramFiles%\CA\APM\Introscope10.1\wily\core\config\IntroscopeAgent.profile

    SET JAVA_OPTIONS=%JAVA_OPTIONS%  %CA_APM_JAVA_OPTIONS%

     

    SET CA_APM_CLASSPATH=%ProgramFiles%\CA\APM\Introscope10.1\wily\common\WebAppSupport.jar

    SET CLASSPATH=%CLASSPATH% %CA_APM_CLASSPATH%

    @REM END BAE CSR CRM-471 CA_APM



  • 4.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 08, 2016 05:13 PM

    The documentation actually shows you exactly what needs to be added to the app server.  He's choosing to use this batch file instead. The syntax in that batch file looks OK to me, but the problem is that we can't see what's actually invoking his app server.  We also can't see when this file is being executed.  On Windows, he could be using a service, which may not be using those environment variables.

     

    I did provide the documentation of how to do it (your original request), and I can confirm that he appears to be setting the environment variables correctly (his request).  To get any further, we'd need need these execution details from your environment.



  • 5.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 08, 2016 05:53 PM

    Tim_McGaughey

    I will reach out to her (app admin) tomorrow AM when she comes into work and ask her what exactly is she doing, step-by-step. In the meantime, I did send her the link you gave out in your previous response to follow. Let's see how that goes in the AM, tomorrow.

     

    Any chance you'd be available for a WebEx if this is goes south?

     

    Thanks

    Manish



  • 6.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Broadcom Employee
    Posted May 08, 2016 06:39 PM
      |   view attached

    As Tim says it depends how the AppServer is started - often with Weblogic it is a script/command file but even those options differ:

    Starting and Stopping Servers

     

    For my Windows Weblogic Samples Medrec server environment:

    I use C:\oracle\Middleware\wlserver_10.3\samples\domains\medrec\bin\startWebLogic.cmd to start it.

    I have the agent directory wily in C:\oracle\Middleware\wlserver_10.3\samples\domains\medrec.

    Here is the JAVA_OPTIONS from my startWebLogic.cmd file which I have also attached:

     

    set JAVA_OPTIONS=%JAVA_OPTIONS% -javaagent:%WL_HOME%\samples\domains\medrec\wily\Agent.jar -Dcom.wily.introscope.agentProfile=%WL_HOME%\samples\domains\medrec\wily\core\config\IntroscopeAgent.profile -Dweblogic.TracingEnabled=true

     

    Hope it helps

     

    Lynn

    Attachment(s)

    zip
    startWebLogic.cmd.zip   2 KB 1 version


  • 7.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Broadcom Employee
    Posted May 08, 2016 06:48 PM

    My CLASSPATH is set as follows:

    set CLASSPATH=%CLASSPATH%;%WL_HOME%\samples\domains\medrec\wily\common\WebAppSupport.jar

     

    In Manish's above post I don't see the required ";" separator between the environment variables (delimited by "%" characters), but maybe that is just due to the post removing them?

    SET JAVA_OPTIONS=%JAVA_OPTIONS%  %CA_APM_JAVA_OPTIONS% should be SET JAVA_OPTIONS=%JAVA_OPTIONS%;%CA_APM_JAVA_OPTIONS%

    SET CLASSPATH=%CLASSPATH% %CA_APM_CLASSPATH% should be  SET CLASSPATH=%CLASSPATH%;%CA_APM_CLASSPATH%



  • 8.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server
    Best Answer

    Posted May 09, 2016 10:07 AM

    Lynn_Williams Tim_McGaughey

     

    So for me, in the "startWebLogic.cmd" file, my entry would look like

     

    set JAVA_OPTIONS=%JAVA_OPTIONS% -javaagent:C:\Program Files\CA\APM\wily\Agent.jar -Dcom.wily.introscope.agentProfile=C:\Program Files\CA\APM\wily\core\config\IntroscopeAgent.profile -Dweblogic.TracingEnabled=true

     

    and

    My CLASSPATH will be set as follows:

    set CLASSPATH=%CLASSPATH%;C:\Program Files\CA\APM\wily\common\WebAppSupport.jar

     

    Are these correct?

    Do I need to worry about the space in between "Program Files"?



  • 9.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 09, 2016 11:26 AM

    I have not had great success with spaces in path names.  Personally, I'd try to use the short path instead of using the space.  You can find the short path for your Program Files directory from the command prompt and the command "dir /x".



  • 10.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 09, 2016 11:37 AM

    Is the windows java agent for WebLogic a 64-bit or 32-bit?



  • 11.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 09, 2016 12:02 PM

    The Java agent is written in Java, so it does not matter.  It will run using the register width of the JDK you use.



  • 12.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Broadcom Employee
    Posted May 09, 2016 12:51 PM

    Hi Manish,

     

    1. As Lynn_Williams mentioned you need to separate classpath entries with ';' on windows (and ':' on linux/unix) - no spaces.
    2. Either use short (8.3) path names as Tim_McGaughey mentioned or put them in double quotes. Otherwise every space is interpreted as parameter delimiter.

    Ciao,
    Guenter



  • 13.  Re: How to Instrument Introscope Java Agent on WebLogic Windows Server

    Posted May 09, 2016 02:41 PM

    Ok, so, looks like it was a syntax error and all is good now. the agents are showing up in the investigator.

     

    Thanks Guenter_Grossberger Lynn_Williams Tim_McGaughey