This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Memory footprint for single application

 
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, say I have java application A, B, C running at the same time on the same machine and I want to find the memory footprint for just A, is there anyway how to do that.
thanks
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If they are executing using the same JVM: no. More likely though, you have three different JVMs running - so just use "top" (on Unix) or the Task Manager -> Processes window (Win NT/2000) to see all the processes running. Look for java processes (using the java executable in the JDK) and figure out which one is which. This may be done by starting / stopping some of the applications to see which lines of the output are affected - or using other clues which may be present. Once you identify the appropriate process, look at the column for memory usage. There you go.
Offhand, I don't remember how/if you can do this on other Windows systems. Let us know what operating system you're using if you have further problems.
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Only barely on topic, but this article from the IBM developer works weighs Java versus native code.
It also includes a short section on memory usage and how it was achieved.
Dave.
 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Offhand, I don't remember how/if you can do this on other Windows systems. Let us know what operating system you're using if you have further problems.


If its' a NT/2000/XP system you can use the task manager.
 
Ranch Hand
Posts: 111
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On Zin, you could use the Performance monitor, see here below :

Please note that the usage is not trivial to really understand what you see & how it affects your overall performances.
Please note also that Linux VM has a bug with respect to the exact Memory used. It shows per thread the total memory used (AFAIK)instead of the memory used by the Thread (to verify)
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!