JRBRINKEMA@USC-ISI.ARPA (01/13/85)
I am trying to meter an applications program that runs on a Pyramid (a sort of 4.2 UNIX ... not vanilla 4.2; more like tutti-frutti, but that is another subject). I need the page buffer statistics bread and lread (buffer reads, logical reads) that are available from SV UNIX in the SYSINFO structure. Any clues as to where such information might be kept under 4.2? tia John Brinkema
chris@umcp-cs.UUCP (Chris Torek) (01/14/85)
> I need the page buffer statistics bread and lread (buffer reads, > logical reads) that are available from SV UNIX in the SYSINFO > structure. I'm not sure what you mean by ``page buffer statistics'', but all the per-process resource usage statistics in 4.2BSD are declared in the files <sys/resource.h>. The paging statistics are kept in long ru_minflt; /* page reclaims */ long ru_majflt; /* page faults */ and long ru_nswap; /* swaps */ The block I/O system statistics are kept in long ru_inblock; /* block input operations */ long ru_oublock; /* block output operations */ There is no separate field for read-ahead cache hits; processes must pay for their read-ahead blocks even if they never use them. The resource usage stuff is obtained through the wait3() system call (see man 2 wait). If you are trying to analyze the buffer cache hit ratio, you can use the (undocumented) vtrace() system call to enable the cache trace points, if your kernel was compiled with -DTRACE. -- (This line accidently left nonblank.) In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) UUCP: {seismo,allegra,brl-bmd}!umcp-cs!chris CSNet: chris@umcp-cs ARPA: chris@maryland