DX Application Performance Management

  • 1.  Management Module Extraction

    Posted Apr 17, 2018 04:03 PM

    I am trying to extract Management Module Supportability.jar file into Supportability.xml using script. and send xml file to different team.

     

    #!/bin/sh

    cd /opt/CA/APM/10.5.2.24/config/modules
    cp Supportability.jar /opt/CA/APM/10.5.2.24/config/modules/jun

    /opt/CA/APM/10.5.2.24/jre/bin/java -Xmx128M jar xf /opt/CA/APM/10.5.2.24/config/modules/jun/Supportability.jar Supportability.xml

     

     

    I  am not able to  execute my script. getting "Error: Could not find or load main class jar".

    Does  anyone has any idea what is missing in my script ?



  • 2.  Re: Management Module Extraction

    Broadcom Employee
    Posted Apr 17, 2018 04:11 PM

    You're trying to run ‘jar' like a Java program instead of like ‘tar'. Uses the same syntax as ‘tar'.



  • 3.  Re: Management Module Extraction

    Broadcom Employee
    Posted Apr 17, 2018 04:48 PM



  • 4.  Re: Management Module Extraction

    Posted Apr 17, 2018 05:23 PM

    Still  getting error

    Here is my code

     

    cd /opt/CA/APM/10.5.2.24/config/modules
    cp Supportability.jar /opt/CA/APM/10.5.2.24/config/modules/jun
    /opt/CA/APM/10.5.2.24/jre/bin/java -Xmx128M tar -tvf /opt/CA/APM/10.5.2.24/config/modules/jun/Supportability.jar

    Here is the error

     

     apmadmin@emsapabdeq:~>./Module.sh
    Error: Could not find or load main class tar   



  • 5.  Re: Management Module Extraction

    Broadcom Employee
    Posted Apr 17, 2018 06:48 PM

    Did you take a look at the screen capture I posted?



  • 6.  Re: Management Module Extraction

    Broadcom Employee
    Posted Apr 17, 2018 06:52 PM

    You're not running a Java program, but the Java ARchive Tool (JAR).

     

    # jar -tvf Supportability.jar

    not

    # java -jar ...



  • 7.  Re: Management Module Extraction

    Broadcom Employee
    Posted Apr 17, 2018 07:07 PM

    Hi Junaid,

    As Hiko_Davis advised you need to remove the first section of your command which uses the java command and leave the last part which should use the jar command (not tar command)

    /opt/CA/APM/10.5.2.24/jre/bin/java -Xmx128M tar -tvf /opt/CA/APM/10.5.2.24/config/modules/jun/Supportability.jar

    ->

    jar -tvf /opt/CA/APM/10.5.2.24/config/modules/jun/Supportability.jar - this will list the contents of Supportability.jar

    jar -xvf /opt/CA/APM/10.5.2.24/config/modules/jun/Supportability.jar - this will extract all the contents of Supportability.jar

    jar -xvf /opt/CA/APM/10.5.2.24/config/modules/jun/Supportability.jar ManagementModule.xml - this will extract only the file ManagementModule.xml from Supportability.jar (which is what you need by the sound of it). 

     

    NOTE: Every xml file inside a MM jar file will have the same name of ManagementModule.xml i.e. the xml file does not share the same name as the MM jar file

     

    Hope that helps

     

    Regards,

     

    Lynn



  • 8.  Re: Management Module Extraction

    Posted Apr 18, 2018 09:33 AM

    hikodavis Lynn_Williams

    Sorry I am not very good in scripting.

    Now I am getting

     

    ./Module.sh: line 6: jar: command not found



  • 9.  Re: Management Module Extraction

    Posted Apr 18, 2018 12:03 PM

    Thanks Hiko_Davis and Lynn_Williams

    I am able to  locate jar file and execute from there.

    Thanks for the help



  • 10.  Re: Management Module Extraction

    Broadcom Employee
    Posted Apr 18, 2018 12:12 PM

    That means that JAR is not installed on your server. When you run the command SuSE should tell you which package you need to install.

    Otherwise, you can copy the MM JAR to your computer and use 7-zip to open the JAR file to get at the XML file.



  • 11.  Re: Management Module Extraction

    Posted May 07, 2018 10:40 AM

    yes that's an easy way to do it