Getting alerts when Java processes crash When bugs occur in the Java runtime environment, most administrators want to get notified so they can take corrective action. These actions can range from restarting a Java process, collecting postmortem data or calling in application support personnel to debug the situation further. The Java runtime has a number of useful options that can be used for this purpose. The first option is “-XX:OnOutOfMemoryError”, which allows a command to be run when the runtime environment incurs an out of memory condition. $ java -XX:OnOutOfMemoryError=”logger Java process %p encountered an OOM condition” … Syslog entries similar to the following will be generated each time an OOM event occurs: Jan 21 19:59:17 nevadadev root: [ID 702911 daemon.notice] Java process 19001 encountered an OOM condition Another super useful option is “-XX:OnError”, which allows a command to be run when the runtime environment incurs a fatal error (i.e., a hard crash).
Patent troll Un article de Wikipédia, l'encyclopédie libre. Un patent troll, (en français « chasseur de brevets » ou « troll des brevets »[1]) est, dans le domaine de la propriété intellectuelle, et plus précisément dans celui de la concession de licences (Licensing), le nom donné à une société ou à une personne physique, qui utilise la concession de licence et le litige de brevets comme principale activité économique. Cette notion fait aujourd'hui l'objet de nombreux articles universitaires, ce qui s'accompagne d'un usage de plus en plus fréquent par les cours de justice[2]. Étymologie[modifier | modifier le code] La dénomination patent troll a été utilisée dès 1993 pour décrire les entreprises qui intentent de multiples procès pour violation de brevet[3]. L'expression a été popularisée par Peter Detkin en 2001 lorsqu'il travaillait pour Intel[4]. Activité[modifier | modifier le code] pour ses détracteurs[modifier | modifier le code] pour ses défenseurs[modifier | modifier le code]
City Life More Odds and Ends of Hprof heap dump format Hprof binary file format is back in my head again, as I consider whether to use it as a native heap dump format. When I wrote about it previously, I was more interested in how to parse it. Now I must consider its strengths and limitations. Strengths Format widely supported by profilers and heap analyzers. Written by the JVM directly and the hprof agent. Compact encoding of both primitive and reference fields. Hprof class and object identifiers are stable for multiple heap dumps written in the same JVM lifetime. The JVM implementation is very fast. The hprof implementation is very readable, excellent code. Weaknesses The JVM uses machine addresses as object identifiers, which change with every gc, so two heap dumps from the same JVM can't be compared object-wise. JVM heap dumps consistently have dangling references to objects that are not reported in the heap dump and, even if -live is specified, objects that are unreachable from any root. Conclusion
Tomcat - Shutdown port On a new installation of Tomcat (default config files), you'll notice that your server.xml file is set up with a shutdown port of 8005, and shutdown="SHUTDOWN". What does this mean? It means that anyone who contacts the server locally on port 8005 and send it the words SHUTDOWN can cause Tomcat to close out all its web applications and shut down cleanly. If your Tomcat server allows anyone except the administrator to log in with a shell, then I strongly suggest you change shutdown="SHUTDOWN" to shutdown="waSS-I41tis" so that at least it won't be a string that any hacker can guess. waSS-I41tis => "what a STUPID SYSTEM - I for one think it's silly" (written 2006-08-18) Associated topics are indexed as below, or enter for individual articles A654 - Web Application Deployment - Configuring and Controlling Tomcat [3043] Gathering information - logging - with log4j. Some other Articles
Joshua Bloch: Performance Anxiety – on Performance Unpredictability, Its Measurement and Benchmarking Joshua Bloch had a great talk called Performance Anxiety (30min, via Parleys; slides also available ) at Devoxx 2010, the main message as I read it was Nowadays, performance is completely non-predictable. You have to measure it and employ proper statistics to get some meaningful results.Microbenchmarking is very, very hard to do correctly. No, you misunderstand me, I mean even harder than that! There has been another blog about it but I’d like to record here more detailed remarks. Today we can’t estimate performance, we must measure it because the systems (JVM, OS, processor, …) are very complex with many different heuristics on various levels and thus the performance is highly unpredictable. Example: Results during a single JVM run may be consistent (warm-up, then faster) but can vary between JVM executions even by 20%. “Benchmarking is really, really hard!” Joshua mentiones a couple of interesting papers, you should check the slides for them. Personal touch Conclusion
Apache Tomcat - Apache Tomcat 6 Downloads Welcome to the Tomcat 6.x download page. This page provides download links for obtaining the latest version of Tomcat 6.0.x, as well as links to the archives of older releases. You must verify the integrity of the downloaded files. You are currently using Please see the README file for packaging information. Source Code Distributions Visualising Garbage Collection in the JVM Recently, I have been working with a number of customers on JVM tuning exercises. It seems that there is not widespread knowledge amongst developers and administrators about how garbage collection works, and how the JVM uses memory. So, I decided to write a very basic introduction and an example that will let you see it happening in real time! This post is about the HotSpot JVM – that’s the ‘normal’ JVM from Oracle (previously Sun). First, let’s take a look at the way the JVM uses memory. The Permanent Generation The permanent generation is used only by the JVM itself, to keep data that it requires. The size of the permanent generation is controlled by two JVM parameters. The Heap The heap is the main area of memory. This size of the heap is also controlled by JVM paramaters. When you create an object, e.g. when you say byte[] data = new byte[1024], that object is created in the area called Eden. The following explanation has been simplified for the purposes of this post. Like this:
Apache Tomcat - Apache Tomcat 6 Downloads Welcome to the Tomcat 6.x download page. This page provides download links for obtaining the latest version of Tomcat 6.0.x, as well as links to the archives of older releases. You must verify the integrity of the downloaded files. We provide OpenPGP signatures for every release file. You are currently using Please see the README file for packaging information. Source Code Distributions How to tame java GC pauses? Surviving 16GiB heap and greater. Memory is cheap and abundant on modern servers. Unfortunately there is a serious obstacle for using these memory resources to their full in Java programs. Garbage collector pauses are a serious treat for a JVM with a large heap size. There are very few good sources of information about practical tuning of Java GC and unfortunately they seem to be relevant for 512MiB - 2GiB heaps size. You may also want to look at two articles explaining particular aspects of HotSpot collectors in more details “Understanding GC pauses in JVM, HotSpot's minor GC” and “Understanding GC pauses in JVM, HotSpot's CMS collector”. Target application domain GC tuning is very application specific. Heap is used to store data structures in memory. Economy of garbage collection Garbage collection algorithms can be either compacting or non-compacting. Solution to this Gordian knot lies in “weak generational hypothesis”. Most objects become garbage short after creation (die young). Object demography Pauses in CMS See also
Apache Tomcat - Apache Tomcat 6 Downloads Welcome to the Tomcat 6.x download page. This page provides download links for obtaining the latest version of Tomcat 6.0.x, as well as links to the archives of older releases. You must verify the integrity of the downloaded files. You are currently using Please see the README file for packaging information. Source Code Distributions Trove