How to monitor memory usage?

How to monitor memory usage?

Post by Steven Bel » Thu, 31 Aug 1995 04:00:00



I've got an application (written in C) running on an 486 box running
VenturComs Venix, a SVR3.2 based UNIX. In my applications target environment,
I am limited in the amount of RAM that my application is allowed to use.
My allocation is well below the total amount in the box, but my app
is not supposed to use more than my share. I've been trying to figure
out a way that my application can check on its memory consumption. I've
played with calling sbrk(0) periodically to determine how much additional
memory I've allocated while running, but I haven't found a way to determine,
at runtime, the total amount of memory my application is using. Any ideas?

--

*******************************************************************


Honeywell Air Transport Systems

 
 
 

How to monitor memory usage?

Post by Kent A Vander Veld » Fri, 01 Sep 1995 04:00:00



Quote:>I've got an application (written in C) running on an 486 box running
>VenturComs Venix, a SVR3.2 based UNIX. In my applications target environment,
>I am limited in the amount of RAM that my application is allowed to use.
>My allocation is well below the total amount in the box, but my app
>is not supposed to use more than my share. I've been trying to figure
>out a way that my application can check on its memory consumption. I've
>played with calling sbrk(0) periodically to determine how much additional
>memory I've allocated while running, but I haven't found a way to determine,
>at runtime, the total amount of memory my application is using. Any ideas?

  Do you have the getrusage() function available?

>--
>*******************************************************************

>Honeywell Air Transport Systems

--
Kent Vander Velden


 
 
 

How to monitor memory usage?

Post by Brandon Wallac » Sat, 02 Sep 1995 04:00:00



=> I've got an application (written in C) running on an 486 box running
=> VenturComs Venix, a SVR3.2 based UNIX. In my applications target environment,
=> I am limited in the amount of RAM that my application is allowed to use.
=> My allocation is well below the total amount in the box, but my app
=> is not supposed to use more than my share. I've been trying to figure
=> out a way that my application can check on its memory consumption. I've
=> played with calling sbrk(0) periodically to determine how much additional
=> memory I've allocated while running, but I haven't found a way to determine,
=> at runtime, the total amount of memory my application is using. Any ideas?

Have you considered toying with the 'ps' command?
Or possibly whatever routines 'ps' calls...
--
                      Brandon Wallace
            Nicholas | Applegate Capital Management

          "I live life face down in the fast lane."

 
 
 

1. tools for monitoring memory usage

Hi,

I am looking for a tool that will help me to inspect
memory usage on a Solaris 2.4 system.  We've got a
Sparc Center 2000 with 896 Megs of memory.  According to
vmstat and Adrian Cockroft, our sr (scan rate) is way
too high.  The system seems to think that it is in a
memory shortage crisis.  I've plugged all the memory leaks
that are currently known.  Now I need to know where the heck
all that memory is going...

Thanks for any suggestions you have.
--

Christopher Morris

Sabre Decision Technologies
Mail Drop 4331
4255 Amon Carter Blvd
Fort Worth, Texas 76155

2. x86 on 486dx100 with 8meg of ram

3. monitoring memory usage

4. PPP/Internet and LAN - how to configure ?

5. RedHat Linux 5.0 & memory

6. Monitoring memory usage

7. Managing crontab mail

8. monitoring memory usage?

9. Monitoring memory usage

10. Monitoring memory usage of "heavy" apps? How?

11. Monitor CPU and Memory usage

12. What is the best way to monitor memory and CPU usage in AIX 4.3.3