


 



<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://docwiki.cisco.com/w/skins/common/feed.css?270"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://docwiki.cisco.com/w/index.php?title=Special:Contributions/Sdandu&amp;feed=atom&amp;limit=50&amp;target=Sdandu&amp;year=&amp;month=</id>
		<title>DocWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://docwiki.cisco.com/w/index.php?title=Special:Contributions/Sdandu&amp;feed=atom&amp;limit=50&amp;target=Sdandu&amp;year=&amp;month="/>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/Special:Contributions/Sdandu"/>
		<updated>2013-05-21T10:48:31Z</updated>
		<subtitle>From DocWiki</subtitle>
		<generator>MediaWiki 1.16.0</generator>

	<entry>
		<id>http://docwiki.cisco.com/wiki/How_to_analyze_the_core_file</id>
		<title>How to analyze the core file</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/How_to_analyze_the_core_file"/>
				<updated>2010-09-24T06:16:17Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: New page: {| border=&amp;quot;1&amp;quot; |- ! '''Problem Summary''' | How to analyze the core file? |- ! '''Error Message''' | N/A. |- ! '''Where to find''' | Refer to  How to check if a process crashed  for the...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Problem Summary'''&lt;br /&gt;
| How to analyze the core file?&lt;br /&gt;
|-&lt;br /&gt;
! '''Error Message'''&lt;br /&gt;
| N/A.&lt;br /&gt;
|-&lt;br /&gt;
! '''Where to find'''&lt;br /&gt;
| Refer to [[ How to check if a process crashed ]] for the location of the core dumps and how to collect them.&lt;br /&gt;
|-&lt;br /&gt;
! '''Recommended Action'''&lt;br /&gt;
|&lt;br /&gt;
* Copy the dump to a machine running similar CCX version.&lt;br /&gt;
* run 'gdb -c &amp;lt;core file path&amp;gt; &amp;lt;exe path&amp;gt;' (exe path is the path of the service executable)&lt;br /&gt;
** Executable name would be part of the dump file name (core.19841.6.'''UCCX_Engine'''.1267009557)&lt;br /&gt;
** Executable file path of a few CCX services&lt;br /&gt;
*** Engine : /opt/cisco/uccx/bin/UCCX_Engine&lt;br /&gt;
*** CVD : /opt/cisco/uccx/bin/UCCX_Cvd&lt;br /&gt;
*** etc&lt;br /&gt;
* Output of gdb would be something similar&lt;br /&gt;
    gdb -c /var/log/active/core/core.19841.6.UCCX_Engine.1267009557 /opt/cisco/uccx/bin/UCCX_Engine&lt;br /&gt;
    ...&lt;br /&gt;
    ...&lt;br /&gt;
    Loaded symbols for /usr/local/thirdparty/java/jdk1.6.0_17/jre/lib/i386/libnio.so&lt;br /&gt;
    Reading symbols from /opt/cisco/uccx/lib/libdriverManager.so...done.&lt;br /&gt;
    Loaded symbols for /opt/cisco/uccx/lib/libdriverManager.so&lt;br /&gt;
    #0  0x008037a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2&lt;br /&gt;
    (gdb)&lt;br /&gt;
* run backtrace 'bt' command for the full stack trace&lt;br /&gt;
    (gdb) bt&lt;br /&gt;
    #0  0x008037a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2&lt;br /&gt;
    #1  0x0025b825 in raise () from /lib/tls/libc.so.6&lt;br /&gt;
    #2  0x0025d289 in abort () from /lib/tls/libc.so.6&lt;br /&gt;
    #3  0x0102fb9f in os::abort () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #4  0x01152b81 in VMError::report_and_die () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #5  0x01153771 in crash_handler () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #6  &amp;lt;signal handler called&amp;gt;&lt;br /&gt;
    #7  0x01009d42 in methodOopDesc::name_and_sig_as_C_string () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #8  0x00dec813 in frame::print_on_error () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #9  0x01152107 in VMError::report () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #10 0x01152aba in VMError::report_and_die () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #11 0x010363ac in JVM_handle_linux_signal () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #12 0x01032624 in signalHandler () from /usr/local/thirdparty/java/j2sdk/jre/lib/i386/server/libjvm.so&lt;br /&gt;
    #13 &amp;lt;signal handler called&amp;gt;&lt;br /&gt;
    #14 0x05a368e1 in '''Java_com_cisco_alarmutil_GenericAlarmJNI_sendAlarmwithDataType'''&lt;br /&gt;
    (env=0x74732c6d, obj=0x3d657461, message=0x54554853, messageParams=0x4e574f44,&lt;br /&gt;
    _catalogID=0x32202c5d) at /usr/lib/gcc/i386-redhat-linux/3.4.6/include/jni.h:1384&lt;br /&gt;
* Report to DE and provide the stack trace and the core dump file.&lt;br /&gt;
* DE would debug the problematic code reported in the stack trace.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
! '''Release'''&lt;br /&gt;
| Release 8.0(1) &lt;br /&gt;
|-&lt;br /&gt;
! '''Associated CDETS #'''&lt;br /&gt;
| NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/How_to_check_if_a_process_crashed</id>
		<title>How to check if a process crashed</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/How_to_check_if_a_process_crashed"/>
				<updated>2010-09-24T06:15:17Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: New page: {| border=&amp;quot;1&amp;quot; |- ! '''Problem Summary''' | How to check if a process crashed? |- ! '''Error Message''' | 53: uccx-ha-n01.localdomain: Feb 09 2010 13:03:04.809 UTC : %UC_SERVICEMANAGER-2-Se...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Problem Summary'''&lt;br /&gt;
| How to check if a process crashed?&lt;br /&gt;
|-&lt;br /&gt;
! '''Error Message'''&lt;br /&gt;
| 53: uccx-ha-n01.localdomain: Feb 09 2010 13:03:04.809 UTC : %UC_SERVICEMANAGER-2-ServiceFailed: %[ServiceName=Cisco Unified CCX Engine][Reason=Service stopped abruptly][ClusterID=][NodeID=uccx-ha-n01]: Service terminated.&lt;br /&gt;
|-&lt;br /&gt;
! '''Where to find'''&lt;br /&gt;
| Look for the above Service Manager alarm&lt;br /&gt;
* Login into RTMT -&amp;gt; SysLog Viewer -&amp;gt; Select a Node -&amp;gt; Application Logs -&amp;gt; CiscoSyslog -&amp;gt; Filter -&amp;gt; App ID = Cisco Service Manager -&amp;gt; UC_SERVICEMANAGER-2-ServiceFailed&lt;br /&gt;
|-&lt;br /&gt;
! '''Recommended Action'''&lt;br /&gt;
| Check if a core file exists&lt;br /&gt;
* Login into RTMT -&amp;gt; Trace &amp;amp; Log Central -&amp;gt; Remote Browse -&amp;gt; Crash Dumps -&amp;gt; Service Name -&amp;gt; Finish&lt;br /&gt;
* Browse the nodes and check for any core files. If there is a core file, download and debug it. Refer to [[ How to analyze the core file ]].&lt;br /&gt;
|-&lt;br /&gt;
! '''Release'''&lt;br /&gt;
| Release 8.0(1) &lt;br /&gt;
|-&lt;br /&gt;
! '''Associated CDETS #'''&lt;br /&gt;
| NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/RCA_for_Engine_failover</id>
		<title>RCA for Engine failover</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/RCA_for_Engine_failover"/>
				<updated>2010-09-24T06:14:29Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: New page: Abrupt Engine mastership failover to the HA node can happen for multiple reasons * '''Engine process crashed''' ** How to find it? Refer to  How to check if a process crashed  ** How t...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Abrupt Engine mastership failover to the HA node can happen for multiple reasons&lt;br /&gt;
* '''Engine process crashed'''&lt;br /&gt;
** How to find it? Refer to [[ How to check if a process crashed ]]&lt;br /&gt;
** How to analyze the core file? Refer to [[ How to analyze the core file ]]&lt;br /&gt;
&lt;br /&gt;
* '''CVD process crashed'''. Engine service is dependent upon CVD service. So if CVD crashes/restarted, Engine too gets restarted, thereby causing mastership failover to the other node.&lt;br /&gt;
&lt;br /&gt;
* '''Engine ran into OutOfMemory'''&lt;br /&gt;
** Check the MIVR logs for the OOM reason.&lt;br /&gt;
*** ''java.lang.OutOfMemoryError: GC overhead limit exceeded''&lt;br /&gt;
** Debug it based upon the OOM reason. Refer to [[ How to debug OutOfMemoryError ]]&lt;br /&gt;
&lt;br /&gt;
* '''Nodes went into island mode (multiple masters) and recovered'''. Upon recovery publisher node retains mastership.&lt;br /&gt;
** Check the MCVD logs for the failover logs.&lt;br /&gt;
* '''Application error happened''', and Engine decided to shutdown&lt;br /&gt;
** Look for ''com.cisco.wfapi.WFKeepAliveException: KeepAliveException in ManagerManagerImpl'' in MIVR logs.&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/How_to_debug_the_root_cause_for_high_CPU_usage</id>
		<title>How to debug the root cause for high CPU usage</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/How_to_debug_the_root_cause_for_high_CPU_usage"/>
				<updated>2010-09-24T06:10:41Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: New page: Unified CCX is not a CPU intensive application. Apart from a few background threads, most of the processing in the CCX processes happen only during the execution of an application workflow...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Unified CCX is not a CPU intensive application. Apart from a few background threads, most of the processing in the CCX processes happen only during the execution of an application workflow (call). Then why is the CPU usage of a CCX service high?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Probable Reasons'''&lt;br /&gt;
* High call load.&lt;br /&gt;
* Application thread looping continuously.&lt;br /&gt;
* Application thread busy in processing some spurious events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Where to Check?'''&lt;br /&gt;
* Login into RTMT and browse 'Server -&amp;gt; Process -&amp;gt; Sort by %CPU'.&lt;br /&gt;
* Find the culprit process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''How to find the root cause?'''&lt;br /&gt;
* '''Find the process/processes that has high %CPU.'''&lt;br /&gt;
** Through RTMT&lt;br /&gt;
*** Server -&amp;gt; Process -&amp;gt; Sort by %CPU.&lt;br /&gt;
*** Find the processId (PID) of the top most entries.&lt;br /&gt;
** Through CLI&lt;br /&gt;
*** Run 'show process using-most cpu'.&lt;br /&gt;
*** Find the processId (PID) of the processes listed.&lt;br /&gt;
    PCPU PID CPU NICE STATE CPUTIME  ARGS&lt;br /&gt;
     4.1 24087   -   0 S 05:47:41 LRMServer -s CadSplkStd -l CADLRMServer&lt;br /&gt;
    '''74.8''' '''23884'''   -   0 S 4-08:02:12 /opt/cisco/uccx/bin/UCCX_Engine /opt/cisco/uccx/conf/UCCX_EngineCfg.xml&lt;br /&gt;
&lt;br /&gt;
* '''Find the thread/threads in the process that has high %CPU.'''&lt;br /&gt;
** Through CLI&lt;br /&gt;
*** Run 'show process pid &amp;lt;pid extracted above&amp;gt;'.&lt;br /&gt;
**** Find the entry (thread) that has high %CPU.&lt;br /&gt;
***** Entries are not sorted based upon %CPU. Need to figure out manually.&lt;br /&gt;
**** Extract the thread id (TID) of the thread.&lt;br /&gt;
** Through root account (remote account)&lt;br /&gt;
*** Run 'top -b -n1 -H -p &amp;lt;pid extracted above&amp;gt;'.&lt;br /&gt;
**** Find the entry (thread) that has high %CPU - listed at the top.&lt;br /&gt;
**** Extract the thread id (PID) of the thread.&lt;br /&gt;
      PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND&lt;br /&gt;
    '''32010''' uccxuser  16   0  680m 438m  16m S '''15.4'''  5.4 814:41.05 UCCX_Engine&lt;br /&gt;
     1305 uccxuser  16   0  680m 438m  16m S 13.5  5.4 733:38.05 UCCX_Engine&lt;br /&gt;
     1341 uccxuser  16   0  680m 438m  16m S 13.5  5.4 623:30.13 UCCX_Engine&lt;br /&gt;
      942 uccxuser  16   0  680m 438m  16m S  3.9  5.4 326:40.52 UCCX_Engine&lt;br /&gt;
&lt;br /&gt;
** Convert the thread id (decimal) to the corresponding hexadecimal value.&lt;br /&gt;
*** Use decimal to hexadecimal converters.&lt;br /&gt;
*** Thread dumps have threads listed with hexadecimal thread ids. So this mapping is required.&lt;br /&gt;
* '''Generate a thread dump.'''&lt;br /&gt;
** If the process is a Java process (most of the UCCX processes are Java processes - UCCX_Engine, UCCX_Cvd, tomcat, etc)&lt;br /&gt;
*** Login into CCX Serviceability Admin. Browse 'Tools -&amp;gt; Performance Configuration and Logging -&amp;gt; Select Server and Service -&amp;gt; Dump Thread trace'.&lt;br /&gt;
*** The thread dump gets generated in JVM.log of the respective service log directory.&lt;br /&gt;
**** For tomcat, it's logged in catalina.out.&lt;br /&gt;
* '''Open the thread dump, and search for the TID (hexadecimal value) extracted above.'''&lt;br /&gt;
    MIVR_ICD_CTI_CLIENTPOOL-72-451-client_thread_452; daemon prio=10 tid=0xa01a4000 '''nid=0x7d0a''' runnable [0x9e6c6000]&lt;br /&gt;
       java.lang.Thread.State: RUNNABLE&lt;br /&gt;
* Debug the application logs and the code to find out why this thread is taking more CPU cycles.&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/How_to_debug_OutOfMemoryError</id>
		<title>How to debug OutOfMemoryError</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/How_to_debug_OutOfMemoryError"/>
				<updated>2010-09-24T06:09:36Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: New page: JVM can crash with OOM Error for multiple reasons.  * Where to check ** Check in the application logs for OutOfMemoryError     Exception in thread “xxx&amp;quot; '''java.lang.OutOfMemoryError''':...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;JVM can crash with OOM Error for multiple reasons. &lt;br /&gt;
* Where to check&lt;br /&gt;
** Check in the application logs for OutOfMemoryError&lt;br /&gt;
    Exception in thread “xxx&amp;quot; '''java.lang.OutOfMemoryError''': Java heap space&lt;br /&gt;
* OutOfMemoryError types&lt;br /&gt;
** Java heap space&lt;br /&gt;
** PermGen space&lt;br /&gt;
** Out of swap space&lt;br /&gt;
** unable to create new native thread&lt;br /&gt;
** Requested array size exceeds VM limit&lt;br /&gt;
** GC overhead limit exceeded&lt;br /&gt;
&lt;br /&gt;
* How to debug different OutOfMemory errors&lt;br /&gt;
** '''Java heap space'''&lt;br /&gt;
** '''GC overhead limit exceeded'''&lt;br /&gt;
*** Happens due to a memory leak.&lt;br /&gt;
*** Heap dumps are automatically generated at 70/80/90/98% thresholds of the heap size.&lt;br /&gt;
**** file name looks like heapDump_MIVR_70%Threshold.hprof.&lt;br /&gt;
*** When the application goes OOM, JVM generates a heap dump during the crash.&lt;br /&gt;
**** file name looks like  java_pid2665.hprof.&lt;br /&gt;
**** Due to a bug CSCte90486, this file can be collected only using remote account.&lt;br /&gt;
*** Collect the heap dumps (present in the service log directory. i.e. MIVR directory for engine heap dumps).&lt;br /&gt;
*** Collect the thread dump present in JVM.log file.&lt;br /&gt;
*** Refer [[ How to analyze heap dumps ]] for the procedure to analyze a heap dump.&lt;br /&gt;
&lt;br /&gt;
** '''PermGen space'''&lt;br /&gt;
*** Happens most probably due to ClassLoader leak.&lt;br /&gt;
*** When the application goes OOM, JVM generates a heap dump during the crash.&lt;br /&gt;
**** file name looks like  java_pid2665.hprof.&lt;br /&gt;
**** Due to a bug CSCte90486, this file can be collected only using remote account.&lt;br /&gt;
*** Collect the heap dumps.&lt;br /&gt;
*** Collect the thread dump present in the JVM.log file.&lt;br /&gt;
&lt;br /&gt;
** '''Out of swap space'''&lt;br /&gt;
*** Happens due to a memory leak in the JNI code, or in some native applications.&lt;br /&gt;
*** System is low on memory.&lt;br /&gt;
*** Collect the Perfmon counters of all the services running in the system.&lt;br /&gt;
*** Plot a graph of memory usage and find which process is the culprit.&lt;br /&gt;
 &lt;br /&gt;
** '''unable to create new native thread'''&lt;br /&gt;
*** Happens when OS runs out of system resources, or the application has run out of its address space due to excessive threads.&lt;br /&gt;
*** Collect the thread dump present in the JVM.log file.&lt;br /&gt;
*** Debug the perfmon logs to find the faulty application.&lt;br /&gt;
&lt;br /&gt;
** '''Requested array size exceeds VM limit'''&lt;br /&gt;
*** Happens due to an application bug or a memory leak.&lt;br /&gt;
*** Debug application logs and heap dumps if present.&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/File:Duplicate_Classes.JPG</id>
		<title>File:Duplicate Classes.JPG</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/File:Duplicate_Classes.JPG"/>
				<updated>2010-09-24T06:06:38Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/File:List_Object_Path_to_GC_Roots.JPG</id>
		<title>File:List Object Path to GC Roots.JPG</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/File:List_Object_Path_to_GC_Roots.JPG"/>
				<updated>2010-09-24T06:05:43Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/File:Dominator_tree_show_objects_by_class.JPG</id>
		<title>File:Dominator tree show objects by class.JPG</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/File:Dominator_tree_show_objects_by_class.JPG"/>
				<updated>2010-09-24T06:04:55Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/File:Dominator_Tree_Group_by_class.JPG</id>
		<title>File:Dominator Tree Group by class.JPG</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/File:Dominator_Tree_Group_by_class.JPG"/>
				<updated>2010-09-24T06:04:05Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/File:Dominator_tree.gif</id>
		<title>File:Dominator tree.gif</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/File:Dominator_tree.gif"/>
				<updated>2010-09-24T06:02:42Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/File:Leak_Suspects.JPG</id>
		<title>File:Leak Suspects.JPG</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/File:Leak_Suspects.JPG"/>
				<updated>2010-09-24T06:01:37Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/How_to_analyze_heap_dumps</id>
		<title>How to analyze heap dumps</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/How_to_analyze_heap_dumps"/>
				<updated>2010-09-24T05:59:15Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: New page: '''Eclipse Memory Analyzer''' is a very good tool for analyzing the heap dumps (.hprof files). Following is a guideline for the initial analysis of the heap dump. * How to get the Eclipse ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Eclipse Memory Analyzer''' is a very good tool for analyzing the heap dumps (.hprof files). Following is a guideline for the initial analysis of the heap dump.&lt;br /&gt;
* How to get the Eclipse Memory Analyzer Tool (MAT)?&lt;br /&gt;
** Download it from http://www.eclipse.org/mat/ and install it on your desktop.&lt;br /&gt;
* How to open the dump?&lt;br /&gt;
** Start Memory Analyzer and select “Open Heap Dump” from the File menu.&lt;br /&gt;
*** MAT parses the heap dump and opens a few default reports.&lt;br /&gt;
*** The pie in the overview pane shows the distribution of retained memory on a per-object basis. It shows the biggest objects in memory (objects that have high Retained memory - memory accumulated by it and the objects that it references).&lt;br /&gt;
* Leak Suspects? - '''Find the memory leak'''&lt;br /&gt;
** If the leak is induced by a single component, it would show up in the pie graph in the overview pane itself.&lt;br /&gt;
*** In the following instance, historical call data was not written to DB and they were accumulated in memory, thereby leading to OOM.&lt;br /&gt;
*** [[Image:Leak_Suspects.JPG]]&lt;br /&gt;
*** It is always easy to find and fix such problems :-)&lt;br /&gt;
** What if the leak is not induced by a single/few objects&lt;br /&gt;
*** Leak suspect may not show up in the overview reports, or in the top of the dominator tree.&lt;br /&gt;
*** The leak could be induced by a class of objects (i.e. leak induced per call).&lt;br /&gt;
**** Open the dominator tree from the toolbar using the button [[Image:Dominator tree.gif]].&lt;br /&gt;
**** Select &amp;quot;Group result by...&amp;quot; from the toolbar and select &amp;quot;Group by class&amp;quot;.&lt;br /&gt;
**** It is more likely to show better view than the per object view.&lt;br /&gt;
**** [[Image:Dominator Tree Group by class.JPG]]&lt;br /&gt;
**** Once a suspect class is found, list its objects and find the objects holding reference to it.&lt;br /&gt;
***** Select List objects –&amp;gt; with incoming references from the context menu. As a result we will get an object reference graph.&lt;br /&gt;
***** Drill down the graph to find the references.&lt;br /&gt;
***** If we are analyzing the references of a single class, it is better to use &amp;quot;Show objects by class -&amp;gt; with incoming references&amp;quot;.&lt;br /&gt;
***** [[Image:Dominator tree show objects by class.JPG]]&lt;br /&gt;
***** Use &amp;quot;Immediate Dominators&amp;quot; to get the list of objects referencing it. You can exclude the packages that you are not interested in.&lt;br /&gt;
**** The easiest way to find out what keeps these leaking objects alive is to check the path to the garbage collection roots.&lt;br /&gt;
***** Select an object and select &amp;quot;Path to GC Roots&amp;quot;&lt;br /&gt;
***** [[Image:List Object Path to GC Roots.JPG]]&lt;br /&gt;
***** To find it at the class level, use the &amp;quot;Merge Shortest Path to GC Roots&amp;quot; query. The Merged Paths to GC Roots view shows the shortest paths from the GC roots to each instance of the selected class.&lt;br /&gt;
****** The thread that is holding the reference is shown. Drill down to find the top level object referencing our suspect class, and drill down further to find our suspect class and its immediate references.&lt;br /&gt;
***** Both the per object and class level path to GC roots gives us an idea of bottom-up and top-down references to the suspect class.&lt;br /&gt;
** '''Use OQL for any custom queries'''.&lt;br /&gt;
*** In one of the customer setup, most of the heap was occupied by Workflow steps. It could be either due to uploading too many scripts, or due to excessive usage of steps per workflow.&lt;br /&gt;
**** Following is an OQL query to list the scripts uploaded, no. of steps per script, and the memory occupied by each script.&lt;br /&gt;
***** ''SELECT toString(wf.script.name) AS Workflow_Script_Name, wf.steps.nSize AS Workflow_Steps_Count, wf.@retainedHeapSize AS Workflow_Mem_Occupied FROM com.cisco.wfframework.obj.WFWorkflow wf''&lt;br /&gt;
**** Following is an OQL query to find which scripts did the customer configure as sub-flows, and their corresponding main script.&lt;br /&gt;
***** ''SELECT toString(sf.subflowExpr.text) AS SubFlow_Name, toString(sf.container.script.name) AS MainFlow_Name FROM com.cisco.wfframework.steps.core.StepCallSubflow sf''&lt;br /&gt;
**** Similar queries can be devised by going through the object graph and using the Inspector window to look at the values of the object attributes.&lt;br /&gt;
** '''Check for Finalizers'''&lt;br /&gt;
*** Finalizable objects are reclaimed only after a few GC cycles since when the object is discovered as unreachable.&lt;br /&gt;
**** If GC discovers that a finalizable object is unreachable, it adds it to finalization queue, from which the finalizer thread retrieves the objects to finalize. The object gets reclaimed only during the GC later to the finalizer thread marking the object as finalized.&lt;br /&gt;
*** Ideally a component should implement finalize() only when it is really required. Also it should be small and should not reference large objects, otherwise the referenced objects too will not get GCed until this object is finalized.&lt;br /&gt;
*** Select &amp;quot;Java Basics -&amp;gt; References -&amp;gt; Finalizer Reference Statistics&amp;quot; to get an overview of which objects implemented finalization, their retained heap, objects ready for finalization, etc.&lt;br /&gt;
** '''PermGen issues - ClassLoader leak'''&lt;br /&gt;
*** Container like Tomcat uses a separate Classloader for loading each webapp. If this classloader does not get GCed when the webapp is stopped/restarted, it is a classloader leak.&lt;br /&gt;
*** Select &amp;quot;Java Basics -&amp;gt; Class Loader Explorer&amp;quot; to get an overview of the list of classloaders, the classes that they defined, and the no. of objects loaded.&lt;br /&gt;
**** To check the references to this Classloader, right click on the classloader and select &amp;quot;ClassLoader -&amp;gt; Path to GC Roots&amp;quot;.&lt;br /&gt;
**** If the references are only held by a thread's contextClassLoader, it could be due to the improper setting of the thread's contextClassLoader.&lt;br /&gt;
*** Select &amp;quot;Java Basics -&amp;gt; Duplicate Classes&amp;quot; to get a list of classes that were loaded by multiple Classloaders.&lt;br /&gt;
**** [[Image:Duplicate Classes.JPG]]&lt;br /&gt;
**** If you notice that a class should have been loaded only once, you can identify the leaking Classloaders by checking the &amp;quot;Path to GC Roots&amp;quot; of the Classloaders that loaded the duplicate class.&lt;br /&gt;
* '''Performance issues'''&lt;br /&gt;
** Select &amp;quot;Java Basics -&amp;gt; Thread Overview&amp;quot; to get the list of the threads that were running at the time of dump generation, and the objects that they are referencing.&lt;br /&gt;
** Use &amp;quot;Java Collection -&amp;gt; *&amp;quot; to get a report on what is the size of each collection, fill ratio of each collection, collision ratio of the maps, objects referencing each collection, etc.&lt;br /&gt;
*** This will give an idea on whether the collection used is an appropriate one, whether it's initial size is properly set, whether the objects implemented proper hashcode, etc.&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/Checking_if_the_current_node_is_a_VOS_publisher</id>
		<title>Checking if the current node is a VOS publisher</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/Checking_if_the_current_node_is_a_VOS_publisher"/>
				<updated>2010-02-08T05:37:51Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: New page: == Checking if the current node is a VOS publisher ==  {| border=&amp;quot;1&amp;quot; |- ! '''Problem Summary''' | How to check if the current node is a VOS publisher? |- ! '''Error Message''' | NA |- ! ''...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Checking if the current node is a VOS publisher ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Problem Summary'''&lt;br /&gt;
| How to check if the current node is a VOS publisher?&lt;br /&gt;
|-&lt;br /&gt;
! '''Error Message'''&lt;br /&gt;
| NA&lt;br /&gt;
|-&lt;br /&gt;
! '''Possible Cause'''&lt;br /&gt;
| NA&lt;br /&gt;
|-&lt;br /&gt;
! '''Recommended Action'''&lt;br /&gt;
| Use the UCCX CLI command 'utils service list'. Look for 'Primary Node =true' at the end of the command's output. On publisher node the value is true, and on subscriber it is false.&lt;br /&gt;
|-&lt;br /&gt;
! '''Release'''&lt;br /&gt;
| Release 8.0(1) &lt;br /&gt;
|-&lt;br /&gt;
! '''Associated CDETS #'''&lt;br /&gt;
| NA&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Unified CCX, Release 8.0]]&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	<entry>
		<id>http://docwiki.cisco.com/wiki/CAD_services_visible_in_CLI_%27utils_service_list%27_command</id>
		<title>CAD services visible in CLI 'utils service list' command</title>
		<link rel="alternate" type="text/html" href="http://docwiki.cisco.com/wiki/CAD_services_visible_in_CLI_%27utils_service_list%27_command"/>
				<updated>2010-02-08T05:20:31Z</updated>
		
		<summary type="html">&lt;p&gt;Sdandu: New page: == CAD services visible in CLI 'utils service list' command.  ==  {| border=&amp;quot;1&amp;quot; |- ! '''Problem Summary''' | CAD services are visible in the output of CLI commands though they should not b...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== CAD services visible in CLI 'utils service list' command.  ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! '''Problem Summary'''&lt;br /&gt;
| CAD services are visible in the output of CLI commands though they should not be in an IVR setup.   &lt;br /&gt;
|-&lt;br /&gt;
! '''Error Message'''&lt;br /&gt;
| Cisco Desktop * [STOPPED]  Service Not Activated&lt;br /&gt;
|-&lt;br /&gt;
! '''Possible Cause'''&lt;br /&gt;
| This is not an issue. The setup being IVR licensed, CAD services wont be running. Only the services that are licensed gets activated.&lt;br /&gt;
|-&lt;br /&gt;
! '''Recommended Action'''&lt;br /&gt;
| Ignore.&lt;br /&gt;
|-&lt;br /&gt;
! '''Release'''&lt;br /&gt;
| Release 8.0(1)&lt;br /&gt;
|-&lt;br /&gt;
! '''Associated CDETS #'''&lt;br /&gt;
| None.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Unified CCX, Release 8.0]]&lt;/div&gt;</summary>
		<author><name>Sdandu</name></author>	</entry>

	</feed>