<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Jps on Micha Kops&#39; Tech Notes</title>
    <link>https://www.hascode.com/tags/jps/</link>
    <description>Recent content in Jps on Micha Kops&#39; Tech Notes</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>Copyright © 2010 - 2025 Micha Kops. #e9d956c0c0154a221ad83c925346a8fa0e72f866</copyright>
    <lastBuildDate>Wed, 11 Oct 2017 00:00:00 +0200</lastBuildDate>
    <atom:link href="https://www.hascode.com/tags/jps/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Snippet: Java Mission Control (JMC) and Flight Recorder (JFR)</title>
      <link>https://www.hascode.com/snippet-java-mission-control-jmc-and-flight-recorder-jfr/</link>
      <pubDate>Wed, 11 Oct 2017 00:00:00 +0200</pubDate>
      <guid>https://www.hascode.com/snippet-java-mission-control-jmc-and-flight-recorder-jfr/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The Java Mission Control and the Java Flight Recorder allow us to capture run-time information from our Java applications without much overhead and aggregate profiling information.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;I have written down the commands that I’m using the most when profiling a Java application with this tool chain in the following article.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;imageblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;img src=&#34;java-mission-control-reports-1024x629.png&#34; alt=&#34;java mission control reports 1024x629&#34;/&gt;
&lt;/div&gt;
&lt;div class=&#34;title&#34;&gt;Figure 1. Java Mission Control - Report&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_running_java_mission_control_jmc&#34;&gt;Running Java Mission Control (JMC)&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;We may start the JMC user interface shown above using the &lt;em&gt;jmc&lt;/em&gt; command that is shipped with Oracle’s JRockit or Java (since Java 7 update 40).&lt;/p&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Finding Memory Leaks using Eclipse and the MemoryAnalyzer Plugin</title>
      <link>https://www.hascode.com/finding-memory-leaks-using-eclipse-and-the-memoryanalyzer-plugin/</link>
      <pubDate>Wed, 02 Nov 2011 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/finding-memory-leaks-using-eclipse-and-the-memoryanalyzer-plugin/</guid>
      <description>&lt;div id=&#34;preamble&#34;&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;The MemoryAnalyzer Plugin for Eclipse allows us to quickly analyze heap dumps from a virtual machine and search for memory leaks. In the following tutorial we’re going to create and run a small application that is going to cause an OutOfMemoryException during its runtime.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;In addition, we’re forcing the virtual machine to save a heap dump and finally analyzing this data using Eclipse and the MemoryAnalyzer plugin.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;ulist&#34;&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://www.oracle.com/technetwork/java/javase/downloads/index.html&#34;&gt;Java Development Kit 6&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;http://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr1&#34;&gt;Eclipse Indigo&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>Java Snippets</title>
      <link>https://www.hascode.com/java-snippets/</link>
      <pubDate>Mon, 01 Mar 2010 00:00:00 +0100</pubDate>
      <guid>https://www.hascode.com/java-snippets/</guid>
      <description>&lt;div class=&#34;sect1&#34;&gt;
&lt;h2 id=&#34;_remote_debug_a_pods_java_process&#34;&gt;Remote Debug a Pod’s Java Process&lt;/h2&gt;
&lt;div class=&#34;sectionbody&#34;&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Simple steps for remote debugging a Java process running on a k8 pod:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;olist arabic&#34;&gt;
&lt;ol class=&#34;arabic&#34;&gt;
&lt;li&gt;
&lt;p&gt;Edit deployment and add the following parameters to the Java start line: &lt;code&gt;-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=127.0.0.1:5005&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;paragraph&#34;&gt;
&lt;p&gt;Also add the following port mapping at the section &lt;code&gt;container → ports&lt;/code&gt; in the deployment:&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code&gt;- containerPort: 5005
  protocol: TCP&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Safe, wait for the new pods and then add a port forward for port 5005 for this pod:&lt;/p&gt;
&lt;div class=&#34;listingblock&#34;&gt;
&lt;div class=&#34;content&#34;&gt;
&lt;pre class=&#34;highlight&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;kubectl port-forward podname 5005&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
