Any way to display the mem usage inside a process ?

Any way to display the mem usage inside a process ?

Post by Viva » Fri, 09 Nov 2001 20:55:52



Hi,
We are developing a server application on Solaris 8.
Is there any way to display the mem usage inside a process ?
Thank you in advance.
Regards
Vivas
 
 
 

Any way to display the mem usage inside a process ?

Post by Gael Trinqua » Sat, 10 Nov 2001 01:05:10



> Hi,
> We are developing a server application on Solaris 8.
> Is there any way to display the mem usage inside a process ?
> Thank you in advance.
> Regards
> Vivas

a portable way:

int pid=getpid();
char cmd[100] ;
sprintf(cmd,"ps -e | grep %i | awk '{print $10}'", pid);
system (cmd);

 
 
 

1. large apache process mem usage

Hi all,

  We are currently running apache on two
machines: a box running solaris 2.6 and a box
running redhat linux v6.  We have quite a few
third-party modules compiled in to the apache
binaries, which grow in size with each one.  We
are currently using:

mod_ssl
mod_fastcgi
mod_php3
mod_perl

 on the solaris box, each httpd process is using
~14 megs total, ~6megs resident.  When we're
under heavy load, we can get 30 or more of these
processes at once, which can cause swapping.
First question - Is this normal memory usage?
Second - Is there any way to share more memory
from the parent process to the children?  Any
other suggestions for freeing up some memory?

Jim Sproull

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Master Boot Record - Resetting

3. how do i find other process's mem usage

4. Directory Link

5. Process Mem usage

6. FYI: the solution to my "driver for an EIDE (ATAPI) CDROM" problem

7. Mem Usage of own process

8. Good Linux distro for older Pentium box, your take?

9. How can I get CPU usage & mem usage in my program?

10. Need System Call to return %MEM (kernel mem) used by process

11. fix i810_dma.c freeing mem inside mem_map

12. question about process memory usage and process memory limits

13. Getting process information/Controlling process resource usage