aspose file tools*
The moose likes Linux / UNIX and the fly likes Linux memory usage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Linux memory usage" Watch "Linux memory usage" New topic
Author

Linux memory usage

Kevin P Smith
Ranch Hand

Joined: Feb 18, 2005
Posts: 362
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

Joined: Jun 25, 2001
Posts: 16142
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14269
    
  21

One very useful tool included in the JDK to check what's happening inside Java processes is jvisualvm.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
 
subject: Linux memory usage