Search This Blog

Thursday, October 30, 2008

Lamda Probe for Tomcat

Recently was involved in a Garbage collection/memory management issue at work. After the problem abated, I was on the search to see if there are any open source memory profiling and monitoring tools for tomcat. For example, a simple way to introspect the various sessions in the container and the objects therein. Investigate the size of the session and more.

During this search, I stumbled upon this article by my Edmon Begoli regarding an open source tool for Tomcat called Lambda Probe. The article is very well written with nice examples etc.

Following the article, I installed the Lamba probe's WAR file in my development tomcat container and accessed the web app in a jiffy and was therein pleasantly surprised at the features the tool delivered.

I was able view the number of sessions in an application, the attributes held there in, the size of the attributes, whether the session and/or attributes there in are serializable or not, Servlet Context attributes.

It was also nice to view the memory consumption of the system and the various memory spaces, all after adding a single line, -Dcom.sun.management.jmxremote, to the JAVA_OPTS. I could view the memory consumption of the system with graphs of all the memory spaces, eden, survivor, perm gen etc.

An additional feature that I liked was one could view JSP's from the console itself, compile a jsp and view the generated Servlet code as well.

One can also view statistics regarding the requests performed etc. Statistics regarding requests and so much more.

In addition, the UI is rather well designed. Simple and intuitive with good Web 2.0 LNF. It makes use of prototype.js and scriptaculous.js from what I could gather.

Quite nice I must say for an open source tool. I will be using Lamda Probe definitely in my development environment to continue evaluation and assist me with debugging without having to write custom code to capture and display all this information.

The only joke in all this is that I was unable to access their site after my initial download, lol! After some googling, the tool can be obtained from HERE.

5 comments:

Sai said...

Sanjay,

Love this tool and thanks for writing about it. pretty comprehensive stats though the only problem I have seen is tomcat goes out of memory. Need to look at it closely.

Great work Sanjay... You are a warrior!

-Sathya

Sanjay Acharya said...

Hey thanks Satya. One thing you can do is by default Tomcat has a low max mem size. Bump it up in the startup to use atleast -Xmx512m

Vimal Krishnan said...

Thanks for heads up. I'm sure you explained well about the features of it. I surely appreciate that tool.

Sanjay Acharya said...

Yeah guys. Only sadness I believe that I fear it may be a dead project.

Ray O'Leary said...

It was a pleasant surprise to google for tools used to profile Tomcat and come across... an article by my own erstwhile colleague!

Hope all's well and you're not feeling the effects of "crunchy credit"... the world is poorly made.

Had a good laugh at seeing "The Barbarian" in a pink raincoat. :-)

-Ray