[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

JVM memory usage

Posted on 2009-07-11
7
Medium Priority
?
503 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 92

Assisted Solution

by:objects
objects earned 1600 total points
ID: 24829964
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 400 total points
ID: 24829967
top will show you. Look for the java process
0
 
LVL 92

Assisted Solution

by:objects
objects earned 1600 total points
ID: 24829993
Its most likely tomcat thats your problem.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Assisted Solution

by:objects
objects earned 1600 total points
ID: 24830001
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 400 total points
ID: 24830022
If you want something a little friendlier, try htop:

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

Accepted Solution

by:
objects earned 1600 total points
ID: 24830029
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
ID: 24830036
Thanks such excelllent answers. I highly appreciated to all.
0

Featured Post

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
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.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

650 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