Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

memory usage per process

 
Reda Mokrane
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
how can I get memory usage per process in linux?

thanks
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Reda Mokrane
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

I mean manually, I have 3 processes running and i want to find out the memory/cpu usage for each.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic