I was trying compare kstat -p -n vminfo with vmstat output regarding
swap and free. The numbers of course did not match even after 
pages were converted into KB.

So I looked at the source for vmstat and saw that the vminfo numbers
were being divided by something called updates.

I found updates in /usr/include/sys/sysinfo.h
sysinfo_t

Looking around in that file I found
typedef struct vminfo {         /* (update freq) update action          */
        uint64_t freemem;       /* (1 sec) += freemem in pages          */
        uint64_t swap_resv;     /* (1 sec) += reserved swap in pages    */
        uint64_t swap_alloc;    /* (1 sec) += allocated swap in pages   */
        uint64_t swap_avail;    /* (1 sec) += unreserved swap in pages  */
        uint64_t swap_free;     /* (1 sec) += unallocated swap in pages */
} vminfo_t;

So by dividing by updates and converting to KB I got comparable
numbers.

But this implies to me that freemem is really a running sum that gets
updated once per second ?

And if I am trying to monitor programatically the amount of virtual
memory available would I use freemem/updates+swap_avail/updates because
swap_free contains allocations ? 

Thanks,
rick


-- 

Rickey C. Weisner 
Software Development and Performance Specialist 
Sun Microsystems, INC
cell phone: 615-308-1147
email: [EMAIL PROTECTED]
_______________________________________________
perf-discuss mailing list
perf-discuss@opensolaris.org

Reply via email to