I''m having some problems with vminfo. According to http://wikis.sun.com/display/DTrace/vminfo+Provider, pgpgin contains the number of pages paged in as arg0. I''ve noticed that vmstat will give me the same values in the pi column. However the vmstat man page says pi is kilobytes paged in. There is no way that I can so consistently get the same values from the pgpgin probe''s arg0 and vmstat''s pi column and have them not be the same information and unit. Which unit am I getting, "count of pages" or "kilobytes paged"? Another problem with pgpgin I''ve seeing..... On sparc I''m getting the same values from vminfo:::pgpgin''s arg0 and vmstat''s pi however there is a difference on x86. On x86 vminfo:::pgpgin''s arg0 is always twice the value of vmstat''s pi. Is there possibly a bug in either the vminfo provider or vmstat? Given that the default pagesize on x86 if 4k and on Sparc it is 8k it seems like vminfo:::pgpgin''s arg0 is being calculated with the wrong page size on x86. (u7 if it matters) -- This message posted from opensolaris.org
Nevermind, problem is in the script I''m dealing with. I missed the line that was doing the math do convert pages to kilobytes. The script mistakenly hardcoded 8 for the pagesize. -- This message posted from opensolaris.org
On 18/02/2010 22:45, Matthieu Chase Heimer wrote:> I''m having some problems with vminfo. According to http://wikis.sun.com/display/DTrace/vminfo+Provider, pgpgin contains the number of pages paged in as arg0. I''ve noticed that vmstat will give me the same values in the pi column. However the vmstat man page says pi is kilobytes paged in. There is no way that I can so consistently get the same values from the pgpgin probe''s arg0 and vmstat''s pi column and have them not be the same information and unit. Which unit am I getting, "count of pages" or "kilobytes paged"? > >I haven''t looked at the code but since according to vmstat.1M epi, api and fpi are all in pages I would be surprised if pi would be different. So I think vmstat man page is wrong.
Thought I''d paste this in from the emails just for completeness'' sake: The vmstat code does the following: a) get system pagesize b) bit-shift right by ten (thus 8192 reduces to 8, 4096 reduces to 4) c) defines a macro to multiply the bit-shifted value with the pgin count which renders a result in kilobytes. The vminfo:::pgin probe resides in pageio_setup(), which is in bio.c. The lines that work for the vminfo provider are: 1321 CPU_STATS_ADDQ(cpup, vm, pgin, 1); 1322 CPU_STATS_ADDQ(cpup, vm, pgpgin, btopr(len)); in which btopr() converts the number of bytes in pgpgin to a number of pages, and rounds the result. Ergo, page count. A bit of tunnel-vision ensued for me, as I imagined I was reading the code incorrectly, or reading the incorrect code. Unfortunately more of the scripts in that guide could use a careful going-over. -- This message posted from opensolaris.org