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