views:

3251

answers:

12

At work, we are trying to combat the monstrosity that our application servers have become - we are now running out of server resources after many months of resource-creep.

I would like to begin the process of finding out what to investigate by seeing what people think the best server monitoring tools are.

Specifically, I'm interested in tools that work with Java and provide method hit counts and runtime, can run stress testing, report on Exception throws, uptime, load, etc. They don't necessarily all need to be a single tool, although that would be great.

What are the best tools out there for this sort of thing? How has your experience been with them? What are the costs involved?

Thanks!

+4  A: 

I am a big fan of VisualVM. You will have to expose MBeans via JMX yourself if you want informaton specific to your app. Tomcat(and other servlet containers I'm sure) expose their own MBeans that expose some of the information you're looking for.

Steve g
+1  A: 

JProfiler worked very well for us.

http://www.ej-technologies.com/products/jprofiler/overview.html

cagcowboy
Not free, but worth the money IMHO
Bill Michell
A: 

I use a couple of tools apache's jmeter and analog. Jmeter to create controlled load and take measurements and analog to observe and measure real load. Oh, and they are both free.

dacracot
+4  A: 

Yourkit Java Profiler is good for a developer's profiling toolkit. For production servers, I'm not sure although I've heard of others using it in that scenario.

"Specifically, I'm interested in tools that work with Java and provide method hit counts and runtime, can run stress testing, report on Exception throws, uptime, load, etc. They don't necessarily all need to be a single tool, although that would be great."

For monitoring uptime, etc : Nagios, www.hyperic.com, or Zenoss should work fine.

JBoss was working on something similar : http://www.jboss.org/jbossesb/docs/4.0Beta1MP1/javadoc/esb/org/jboss/soa/esb/nagios/monitor/package-tree.html

Here's something from adventnet -- http://manageengine.adventnet.com/products/applications_manager/monitoring-jboss.html Some of the components that can be monitored with this product are:

* JVM Memory Usage
* Server Response Time
* Enterprise JavaBeans (EJBs)
* Metrics of all web applications
* Thread Pools
* Java Database Connectivity (JDBC) Pools
* Custom attributes

Hope that helps,

anjanb
YourKit is great for code-level monitoring of production servers. The agent sits there in the VM with pretty much no impact, so you can leave it there are attach the GUI tool when you need to.
skaffman
A: 

I have had pretty good luck with ITCAM from IBM. It seems to be made for WebSphere, but I understand that it will function well on most J2EE servers. It's pricy, but it works nice.

http://www-01.ibm.com/software/tivoli/products/composite-application-mgr-soa/ http://www.youtube.com/watch?v=cp6jCfZxrRk

Konrad
A: 

OpenNMS is a good tool for monitoring a network of many application servers. Out-of-the-box, it monitors operating-system level behaviour, and can be extended via JMX to monitor any amount of detail of the application servers themselves.

skaffman
A: 

Dynatrace is a great monitoring tool. Jinspire has also a tool that looks very promising.

kohlerm
A: 

JRockit Mission Control shows uptime, exception count, method count, memory leaks, I/O latencies, gc pauses, lock contention, heap memory usage, allocation latencies, JVM CPU-usage, live set size, time it takes generate Java-code, fragmentation level, compaction times, you name it...

It can be used in a production environment and the overhead is negligible, usually less than 1%.

You can download it here. It's free to use for development

Kire Haglin
+7  A: 

You have different kinds of tools to get different kind of information.

Let's start with the tools you would not run on a production server.

First you have the code profilers, like JProfiler and Yourkit Profiler. You use these tools to get in depth information on how the application behaves internally, mostly focused on performance of specific methods and memory consumption.

Second you want to simulate a production server with more load than a single developer clicking away on the application. You use load-testing tools like JMeter to simulate the actual circumstances that will occur on production, with multiple users active at the same time.

Note that you can combine both a profiler and a load test tool to have information on what happens inside the application, when the application is under load. Keep in mind that use of a profiler adds some overhead to the application and will affect the measurements of the load test tool.

Then there's the tools you can use on production servers.

First there are the monitoring tools like Nagios. These can monitor the application from the outside and can record information that is exposed to the application. This usually means information available through the operating system, like memory and CPU statistics and information explicitly made available within the application because this exposed from the application using JMX. This means you have to write or alter code to expose specific data.

Finally there's Glassbox. This tool monitors java applications via Aspect Oriented Programming. Meaning that Glassbox can monitor the application on the inside and it knows about methods and exceptions, without altering one line of code. Glassbox then not only monitors and logs information, but actually diagnoses specific errors and performance and resource problems.

All tools have their use and complement each other, but especially Glassbox can give a very quick insight on what's happening on your production server.

Please note that Glassbox has some, but very limited overhead on the server. So make sure the overhead is acceptable before installing this on production servers.

Marco Tolk
Glassbox looks great - the google tech talk about glassbox is very informative.
Brian Clozel
For production server performance management, there are a couple other tools to consider: In the commercial space, there's also CA (formerly Wily) Introscope and HP Sitescope. They're both really expensive though. Another good open source solution to consider is from Hyperic.
Dan Tanner
I have evaluated Glassbox recently. I have found that Glassbox is good out of the box solution for simple scenario. However it lacks in ability to customization (what all data you want to monitor). Documentation also not upto the mark especially if you want to integrate with other applications like Nangio (there is JMX api available, however I could not find documentation for that). Being an Opensource project I hope it will evelove over a period of time. On the whole it is great tool.
Rejeev Divakaran
A: 

Don't forget JProbe. We use it a few times a year to investigate performance problems and it works a treat. Can't deploy in production though.

Also, it's not too hard to write your own monitoring tool. We store and report on all kinds of interesting information like number of database hits, which database server was in use, and even GC stats and memory usage - see the java.lang.management package for the latter. If you want similar data in a GUI, see jconsole.

Douglas Squirrel
+1  A: 

JavaMelody is such a monitoring tool (but not a profiler and not a stress tool) that will highlight what to investigate.

http://javamelody.googlecode.com

evernat
A: 

Check the eG Java Monitoring tool - http://www.eginnovations.com/web/java-monitoring.htm

Tom