Skip to Content

How to create Java Heap Dump from SCC service for SUP 2.x

 

Purpose

This technical document explains how to create a java heap dump from a specific
service (Sybase Control Center – SCC) by JVisualVM for debugging purposes by development.

Additionally a Profile of the CPU usage can be created.

 

DESCRIPTION

To detect a memory leak issue for a specific service a
java heap dump can be generated using JVisualVM.

  

Required Software

1.     SUP 2.x.x or higher.

2.    JVisualVM (included in SUP)

   

Additional requirements

1.     Access to Sybase Control Center.

2.     Access to the JDK under the Sybase installation.

3.     JVisualVM can only attach to a running JVM using the same account.

        That is the reason the document suggests starting SCC from command prompt using scc.bat.

        By default, the SCC service runs under “Local System Account”.

        If in SCC service has been configured to run using a specific user account, and the JVisualVM

        is also launched after login
        to the host using the same account, JVisualVM should be able to see and attach

        to the SCC service JVM process.

        Otherwise, another option is to temporarily configure SCC service to run with the same identity

        (choose Properties>Log on>This Account) as the account used for JVisualVM.  

Assumption

  • This document assumes you have a working SUP environment.
  • Have Administrator rights to the Operating System and Sybase Unwired Server.

  

Issue “High CPU utilization consuming more than 50% of CPU”

  • User needs to debug high CPU usage.

    

Step 1 Configure SCC startup

  • SCC service needs to be started from command line

 

Solution

  1. Stop the SCC service.

     /wp-content/uploads/2013/08/1_services_262429.png

  2.     In command line console, cd “%SCC_HOME%\bin folder and set SCC_JAVA_HOME

          environment variable, then run scc.bat.

          It might be necessary to set the 64bit SCC_JAVA_HOME (JDK1.6.0_31-x64)

          instead of the 32bit (JDK1.6.0_31).

     /wp-content/uploads/2013/08/2_console_scc_262452.png     

  3.            Start the JVisualVM from command line.

        /wp-content/uploads/2013/08/3_jvisualvm_start_262463.png

Step 2 Creating Java heap dump file

  • SCC process needs to be attached
  • “Memory” needs to be sampled
  • Capturing the Heap Dump

        

Solution

 

  1. Select the correct process to monitor (The com.sybase.ua.startup.Startup process).
  2. In the “Sampler” tab click “Memory” to sampling the memory.
  3. Perform a heap dump by first clicking on “Perform GC” and afterwards on “Heap Dump”.

     /wp-content/uploads/2013/08/4_jvisualvm_hprof_262455.png

    4.     The following screenshot shows where to find that .hprof file.

            This file should be send to the development team.

     /wp-content/uploads/2013/08/5_jvisualvm_hprof2_262456.png     

           

Step 3 Profile CPU usage

  • Creating CPU profiling image

    

Solution

 

  1. In the “Profiler” tab, click on the “CPU” button.
  2. Wait for more than 10 minutes or even more. Note that CPU profiling needs consuming long time.
  3. Click on the “Save Current View to Image” button.
  4. Send the image to the development team.

      /wp-content/uploads/2013/08/6_jvisualvm_cpu_262457.png

  

Summary

 

This document explained in details about the steps needed to set up the SCC process and JVisualVM 

and capture the Java Heap dump in the Sybase Unwired Server to show if there is any issues 

such as memory leak. This is a very valuable procedure to provide dumps for debugging in development.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply