• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Linux memory usage

 
Kevin P Smith
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Just wondering if there is a Linux command or functionality that would allow me to see what is using my Servers memory, in more details.

I know from # top shows me that Tomcat is allocating 20gb (VIRT) and using about 8gb RAM, but is there a way I can drill down further to see what Tomcat is actually using this 20gb and 8gb for?

This is a legacy application I have inherited therefore I have no idea what is going on deep down in the thousounds of lines of code in the 1500+ classes, but as soon as I start Tomcat the VIRT is at 20gb and RAM at 8gb and within a day I'm getting OutOfMemory errors.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18282
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Linux doesn't know or care what goes on inside of Tomcat or any other JVM-based application. As far as Linux is concerned, a big chunk of virtual memory has been allocated for Tomcat to use, and what Tomcat does with it is Tomcat's business.

To find out how memory is being used inside of Tomcat, you'll need to use JVM memory-management tools such as the memory profiler that comes with the JDK, the jprofile app that taps into Tomcat's MBeans and similar such diagnostic aids.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15458
42
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One very useful tool included in the JDK to check what's happening inside Java processes is jvisualvm.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic