profile java memory use on linux
i have a socket server written in java, and i believe there is a memory leak. The i could not find anything in Netbeans' profiler, so i want to test it when it in deployed on my ubuntu server. How do i do 开发者_Python百科this? What is an easy to install and use java profiler for ubuntu?
You can check out jprofiler. This works great. http://www.ej-technologies.com/download/jprofiler/files.html
Try Java VisualVM:
sudo apt-get install visualvm jvisualvm
First of all, if you couldn't find anything with the NetBeans profiler, then VisualVM won't give you much more satisfaction as VisualVM is a standalone version of NetBeans profiler.
That being said, my recommendation to hunt memory leaks would be Eclipse Memory Analyzer (MAT). In my opinion, this is simply the best Java heap analyzer you can get (even for money).
See also
- Heap Dump Analysis with Memory Analyzer, Part 1: Heap Dumps
- Heap Dump Analysis with Memory Analyzer, Part 2: Shallow Size
- Automated Heap Dump Analysis: Finding Memory Leaks with One Click
- Memory Analyzer Webinar
- Getting Started
If you're strictly looking for a CPU and Memory profiler, famous commercial products include YourKit and JProfiler, YourKit being my preferred one (JXInsight is another excellent product but not strictly a profiler).
Related questions
- Please recommend a Java profiler
- What advantages have a commercial Java profiler over the free ones, e.g. the one in Netbeans?
- Open Source Java Profilers
- Eclipse Java Profiler
- Which Java profiler is better: JProfiler or YourKit?
精彩评论