Solved

JVM memory usage

Posted on 2009-07-11
7
484 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
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 100 total points
ID: 24829967
top will show you. Look for the java process
0
 
LVL 92

Assisted Solution

by:objects
objects earned 400 total points
ID: 24829993
Its most likely tomcat thats your problem.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 92

Assisted Solution

by:objects
objects earned 400 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 100 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 400 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Creating and Managing Databases with phpMyAdmin in cPanel.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

947 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

21 Experts available now in Live!

Get 1:1 Help Now