memory reported by vmstat

memory reported by vmstat

Post by Le-Chin Eugene L » Sun, 09 Jul 1995 04:00:00



Hi,

Could someone help explain how vmstat calculates the free memory and swap
space on Solaris 2.3? I have had a hard time to figure out where all my
memory goes. What I did was adding up the memeory size (ps -elf) used by
each processes. It seems we have couple hundred MB missing somewhere.
Thanks for the help.

-Phil

 
 
 

1. vmstat and memory reporting

Hi All,

When i use vmstat, i get information which is averaged over a time interval.
The first row being since boot time and the following rows of information
is over the interval specified. I understand the output of vmstat and also other
tools
like cpustat, cputrack, pmap, iostat and prstat.
***************Example**********
w-srsriram>> vmstat 5 5
 procs     memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr aa dd f0 --   in   sy   cs us sy id
 0 0 0 1176072 144784 0   7  4  0  0  0  0  0  0  0  0  236  742   71  1  1 98
 0 0 0 1150520 98288  0   0  0  0  0  0  0  0  0  0  0  364 1540  190  1  1 98
 0 0 0 1150432 98200  0   8  0  0  0  0  0  0  0  0  0  370 2312  250  1  1 97
 0 0 0 1150304 98072  0   0  0  0  0  0  0  0  0  0  0  286 2069  229  1  0 99
 0 0 0 1150304 98072  0   0  0  0  0  0  0  0  5  0  0  306 1839  207  0  1 98

w-srsriram>>
**********End Example**************
In vmstat, i can understand averaging the values for CPU usage by a process in a
time interval T. One can see the values in the raw counters being updated.

My understanding is that:
the free memory in the system = free list pages + cache list pages.

So why do we take an average over interval of time T for memory usage?
Ideally, the free memory should be the addition of these 2 variables and not an
average.

How does Solaris store the information about memory usage by process and on a
system wide basis? How does Solaris compute/store free memory in the system?

Why do i need to average free memory values in vmstat?

The motivation for this is that i have built a tool which monitors system
resources by getting and processing "kstat" infromation. If i dont' average the
free
memory, i get some very very long number. If i average it, i get the right value
as
returned by vmstat.

I would appreciate your pointers to help  understanding this,

Kind regards
Sriram

2. User can't login via XDM

3. Amateur Radio and RH7.1

4. vmstat and memory reporting!!

5. mtools configuration?

6. vmstat | sed WORKS vmstat | logger WORKS vmstat | sed | logger FAILS

7. Video Capture Cards

8. vmstat | sed WORKS vmstat | logger WORKS vmstat | sed | logger FAILS - NEED HELP

9. Total memory reported / memory used

10. to less memory shown/used with vmstat

11. SUNOS vmstat memory fre - decrease

12. vmstat,sar,mpsar memory fault