We have a program that tries to measure the paging rate as a load index.
To do this we read the information from the kernel. The information is
contained in the following data struct (defined in sys/sysinfo.h):
typedef struct cpu_vminfo {
ulong pgrec; /* page reclaims (includes pageout) */
ulong pgfrec; /* page reclaims from free list */
ulong pgin; /* pageins */
ulong pgpgin; /* pages paged in */
ulong pgout; /* pageouts */
ulong pgpgout; /* pages paged out */
ulong swapin; /* swapins */
ulong pgswapin; /* pages swapped in */
ulong swapout; /* swapouts */
ulong pgswapout; /* pages swapped out */
ulong zfod; /* pages zero filled on demand */
ulong dfree; /* pages freed by daemon or auto */
ulong scan; /* pages examined by pageout daemon */
ulong rev; /* revolutions of the page daemon hand */
ulong hat_fault; /* minor page faults via hat_fault() */
ulong as_fault; /* minor page faults via as_fault() */
ulong maj_fault; /* major page faults */
ulong cow_fault; /* copy-on-write faults */
ulong prot_fault; /* protection faults */
ulong softlock; /* faults due to software locking req */
ulong kernel_asflt; /* as_fault()s in kernel addr space */
ulong pgrrun; /* times pager scheduled */
We tried to use "pgpgin + pgpgout + pgswapin + pgswapout".Quote:} cpu_vminfo_t;
However, the values we got are meaningless:
o It does not change over time, no matter how we try to load the machine.
o Every time we run this program, we got a different constant value.
A typical output is:
pgpgin=39401, pgpgout=302, pgswapin=0, pgswapout=0
It never changes.
Can someone help?
Thanks.
Jingwen Wang
CSRI
U of Toronto
jwang