memory uage - real, virtual & caching

memory uage - real, virtual & caching

Post by Phil Schuman - OLe » Sat, 25 Sep 1999 04:00:00



here is a snapshot from our "monitor" program -
It seems that the system tries to keep the processes allocated to real,
and then whatever is left goes to file caching -
    is this correct ?

If so - then how do pages wind up out in Virtual ? vs real (with memory to
burn)
Where can I see the breakdown between real/virt for each running process ?
    Is that the SIZE vs RES - does it look the same in VMSTAT

    What about caching info for open files ?

Phil -
--------------

Load averages:  2.40,  2.42,  2.48           dsprs6000 Fri Sep 24 16:10
Cpu states: 61.1% user 38.9% system  0.0% wait  0.0% idle
Logged on:  60 users   3 active 59 remote 318:00 sleep time

Real memory:  112.7M procs  526.6M files    0.7M free  640.0M total
Virtual memory:              90.3M used   613.7M free  704.0M total

Netw   read  write kB/s  packin  packout insize outsize
 lo0    29.4    29.4       15.6     15.6   1936   1936
 en0     1.4    13.2       31.1     35.5     45    378

   PID USER     PRI NICE SIZE   RES STAT     TIME  CPU%     COMMAND
 34170 ecron     88   0 2173k 1844k Frun    44:35 32.9/49.0 pro5
 31122 howardm   87   0 1817k 1468k Frun    11:29 31.8/ 2.2 pro5
 63098 root      70   0  637k  732k Frun     0:07 11.3/10.1 monitor

 
 
 

1. How to find out the cpu usage, real & virtual memory usage ?

Hi
I am supposed to write a small application (agent) that reports the
cpu usage, real(physical) memory and virtual meomry usage of a host to
a system management application (ie the manager) via tcp/ip.

I have a few questions regarding working out the total cpu usage, the
total amount of physical and virtual memory being used by all
processes running on a workstation.

The first question is, I have learnt that the use of the kstat/kvm API
will give me the access to such parameters but I havent been able to
find enough information on this.  so If anyone can point me to the
right direction I will be very thankful. I have looked thru the books
that came with the OS but no luck there.

The second question, and probably a more fundamemtal one is that, from
what Ive heard from the SUN help desk, it isnt possible to work out
the total amount of physical memory used by all processses on a
system, even if I can figure out how much is being used by a given
process, since there is no way to find out how much memory is shared
between processes (e.g shared library). I was wondering if anyone from
this NG can confirm this.
If that is the case, that I guess I will have to make do with the sum
of the amounts of memory each process occupies, which will somehow be
larger than the actual amount of the physical memory being used.

Any help will be much appreciated, TIA.

2. Welcome to comp.unix.shell [Frequent posting]

3. Real Memmory /Virtual Memory /Physical Memory Accountancy.

4. read(), size of array, null-terminate

5. Apache 1.2.1 & virtual domains & real domain

6. libsvga games not working all of a sudden

7. vmstat and real/virtual memory question

8. IPv6: Fix Prefix Length of Link-local Addresses

9. real/virtual memory

10. Question on real/virtual memory displayed by Monitor

11. Obtaining a buffer of real (non-swap/virtual) memory

12. solaris virtual memory and io cache

13. Memory buffer & Cache.