www.ShoppingPodder.com

Leading Computer Shopping,
News and information


Part of the Identityscape.com network...

getxfactor.com jmoodmusic.com smartbusinesschoices.com mintdepot.com lowfaresalways.com evangelicalview.com shoppingpodder.com soproudlywehail.com webnews.ws currenthumor.com

 

 

How can i find out how much memory is used.
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer Applications  
View previous topic :: View next topic  
Author Message
Guest







PostPosted: Fri Nov 14, 2008 5:44 am    Post subject: How can i find out how much memory is used. Reply with quote

I'm writting an application server and need a fast way to check how
much memory by a process is used and do an emergency stop (aka
terminate) if the process is running wild.

Whats the best way to do this?
Back to top
Nate Eldredge
Guest






PostPosted: Fri Nov 14, 2008 8:52 am    Post subject: Re: How can i find out how much memory is used. Reply with quote

scholz.lothar@gmail.com writes:

Quote:
I'm writting an application server and need a fast way to check how
much memory by a process is used and do an emergency stop (aka
terminate) if the process is running wild.

Whats the best way to do this?

man proc

The various fields of /proc/[pid]/statm should have what you want, once
you decide exactly what you mean by "how much memory is used".
Back to top
Jasen Betts
Guest






PostPosted: Fri Nov 14, 2008 3:04 pm    Post subject: Re: How can i find out how much memory is used. Reply with quote

On 2008-11-14, scholz.lothar@gmail.com <scholz.lothar@gmail.com> wrote:
Quote:
I'm writting an application server and need a fast way to check how
much memory by a process is used and do an emergency stop (aka
terminate) if the process is running wild.

Whats the best way to do this?

best way is to use well behaved software in the first place,

otherwise you can look in /proc/%d/status

where %d is replaced with the PID.
Back to top
David Schwartz
Guest






PostPosted: Fri Nov 14, 2008 5:39 pm    Post subject: Re: How can i find out how much memory is used. Reply with quote

On Nov 13, 9:44 pm, scholz.lot...@gmail.com wrote:
Quote:
I'm writting an application server and need a fast way to check how
much memory by a process is used and do an emergency stop (aka
terminate) if the process is running wild.

Whats the best way to do this?

Virtual memory or physical memory?

DS
Back to top
Guest







PostPosted: Wed Nov 19, 2008 10:36 am    Post subject: Re: How can i find out how much memory is used. Reply with quote

On 14 Nov., 18:39, David Schwartz <dav...@webmaster.com> wrote:
Quote:
On Nov 13, 9:44 pm, scholz.lot...@gmail.com wrote:

I'm writting an application server and need a fast way to check how
much memory by a process is used and do an emergency stop (aka
terminate) if the process is running wild.

Whats the best way to do this?

Virtual memory or physical memory?

Physical memory, not adress space.
I want to write an application server for very low memory virtual
servers (~100 MByte total RAM)
and without swap space.
Back to top
David Schwartz
Guest






PostPosted: Wed Nov 19, 2008 6:45 pm    Post subject: Re: How can i find out how much memory is used. Reply with quote

On Nov 19, 2:36 am, scholz.lot...@gmail.com wrote:

Quote:
I'm writting an application server and need a fast way to check how
much memory by a process is used and do an emergency stop (aka
terminate) if the process is running wild.

Whats the best way to do this?

Virtual memory or physical memory?

Physical memory, not adress space.
I want to write an application server for very low memory virtual
servers (~100 MByte total RAM)
and without swap space.

Then 'ps' will tell you what you want. The 'RSS' column will tell you
how much physical memory it's using.

DS
Back to top
Jasen Betts
Guest






PostPosted: Thu Nov 20, 2008 9:07 am    Post subject: Re: How can i find out how much memory is used. Reply with quote

On 2008-11-19, scholz.lothar@gmail.com <scholz.lothar@gmail.com> wrote:
Quote:
On 14 Nov., 18:39, David Schwartz <dav...@webmaster.com> wrote:
On Nov 13, 9:44 pm, scholz.lot...@gmail.com wrote:

I'm writting an application server and need a fast way to check how
much memory by a process is used and do an emergency stop (aka
terminate) if the process is running wild.

Whats the best way to do this?

Virtual memory or physical memory?

Physical memory, not adress space.
I want to write an application server for very low memory virtual
servers (~100 MByte total RAM)
and without swap space.

why not let the kernel do it for you using the setrlimit call?
Back to top
Display posts from previous:   
   Shopping Podder - the Best of Computer Postings! Forum Index -> Computer Applications  
Page 1 of 1
All times are GMT

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum