Solved

JVM memory usage

Posted on 2009-07-11
7
482 Views
Last Modified: 2012-05-07
Hi: There!

I have tomcat and MYSQL running in same machine. My OS is Linux Ubuntu. I try to see how big memory consumption by MYSQL and JVM(tomcat). My stratergy is to use: free -m to check how big memory is used by both of them. Then I try to check tomcat JVM's conumption. After that, I also could know the memory consumption of database. But I do not know how to check JVM memory consumption. Could someone tell me some solution or are there better way?
0
Comment
Question by:JianJunShen
  • 4
  • 2
7 Comments
 
LVL 92

Assisted Solution

by:objects
objects earned 400 total points
Comment Utility
top will show memory usage by all processes, the RES column is the one of interest to you.
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 100 total points
Comment Utility
top will show you. Look for the java process
0
 
LVL 92

Assisted Solution

by:objects
objects earned 400 total points
Comment Utility
Its most likely tomcat thats your problem.
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 92

Assisted Solution

by:objects
objects earned 400 total points
Comment Utility
and be aware that its memory usage will grow over time so check its usage at startup as well as after it has been nrunning for a decent amount of time.
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 100 total points
Comment Utility
If you want something a little friendlier, try htop:

http://htop.sourceforge.net/
0
 
LVL 92

Accepted Solution

by:
objects earned 400 total points
Comment Utility
this will give you the usage

ps aux | awk '{print $4"\t"$11}' | sort | uniq -c | awk '{print $2" "$1" "$3}' | grep java

0
 

Author Comment

by:JianJunShen
Comment Utility
Thanks such excelllent answers. I highly appreciated to all.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now