File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Linux / UNIX and the fly likes memory usage per process Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Reply Bookmark "memory usage per process" Watch "memory usage per process" New topic
Author

memory usage per process

Reda Mokrane
Ranch Hand

Joined: Jul 25, 2001
Posts: 235
Hi
how can I get memory usage per process in linux?

thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35230
    
    7
Do you mean manually of programmatically? The "top" command lists all processes with their real and virtual memory allocations. You could run that from within Java using Runtime.exec and parse its output for the values you're interested in.


Android appsImageJ pluginsJava web charts
Reda Mokrane
Ranch Hand

Joined: Jul 25, 2001
Posts: 235
Thanks.

I mean manually, I have 3 processes running and i want to find out the memory/cpu usage for each.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: memory usage per process
 
Similar Threads
CPU usage and memory usage by processes
java memory usage on linux
java constants
Memory Usage shown by Windows Task Manager and VM Telemetry view
instance in a for loop - right /wrong/doesn't matter ?