<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1458" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=453121912-20082004><FONT size=2>
<DIV><FONT face=Arial size=2><SPAN class=250192614-19082004>I've looked at code
of check_nt.c and there's this remark:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=250192614-19082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=250192614-19082004>// Changed divisor
in following line from v to 3044515 to accurately reflect memory
size</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=250192614-19082004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=250192614-19082004>This is incorrect.
The memory size that check_nt reports is a sum of RAM and pagefile sizes, as
defined here:</SPAN></FONT></DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT face=Arial size=2><SPAN
class=250192614-19082004></SPAN></FONT></SPAN></FONT> </DIV>
<DIV><SPAN class=250192614-19082004><FONT face=Arial><SPAN
class=250192614-19082004>"<SPAN class=453121912-20082004>Commit Charge:
</SPAN></SPAN>In the Windows operating system, the name for the amount of
physical memory (RAM) and virtual memory that is allocated to all running
programs, or applications, and the operating system itself.</FONT></SPAN></DIV>
<DIV><FONT face=Arial><SPAN class=250192614-19082004></SPAN></FONT> </DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT size=2><FONT
face=Arial><SPAN class=250192614-19082004>"</SPAN>Windows Task Manager displays
the commit charge in its Performance tab. There are three memory readings,
measured in kilobytes:</FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=250192614-19082004></SPAN></FONT> </DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT face=Arial size=2>*
Total: refers to the total amount of physical and virtual memory the computer is
using at that moment.</FONT></SPAN></FONT></DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT face=Arial size=2>*
Limit: refers to the combined limit of both the physical memory and the
allocated virtual memory.</FONT></SPAN></FONT></DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT face=Arial size=2>*
Peak: refers to the highest total system memory usage during the session in
which you are using the computer.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=250192614-19082004></SPAN></FONT> </DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT size=2><FONT
face=Arial><SPAN class=250192614-19082004>"</SPAN>The commit charge will
increase when applications are opened and used and decrease when applications
are closed.<SPAN
class=250192614-19082004>"</SPAN></FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT face=Arial size=2><SPAN
class=250192614-19082004></SPAN></FONT></SPAN></FONT> </DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT size=2><SPAN
class=250192614-19082004></SPAN></FONT><FONT face=Arial size=2><SPAN
class=250192614-19082004>So, dividing the memory collected by 3044515 is
confusing, to say the least, as what is shown by MEMUSE is actually the
Commit Charge. Dividing it by 3044515 assumes that we're using paging space
that is two times the size of Physical RAM - this was exactly the
reasoning used by a friend of mine, a Windows specialist. But he
corrected himself quickly and went to check the paging file size. It was
1.5x the size of physical RAM and could grow up to 2x physical RAM, when
neccessary. But even this behavior may be changed by the user -
specifying a paging space that it's 3x the physical RAM, for exemple - thus
making the plugin output useless.</SPAN></FONT></SPAN></FONT></DIV>
<DIV><FONT size=+0><SPAN class=250192614-19082004><FONT face=Arial size=2><SPAN
class=250192614-19082004></SPAN></FONT></SPAN></FONT> </DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><FONT
face=Arial>Another problem with this change is that the values returned by
the plugin are different that those shown on field "Commit Charge" on Windows
Task Manager, and this may confuse Windows SA's.</FONT></SPAN></SPAN></DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><FONT
face=Arial></FONT></SPAN></SPAN> </DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><SPAN
class=453121912-20082004><FONT face=Arial>Also, t<FONT face=Arial><SPAN
class=640144420-18082004>he original patch made by Gary Cook seems not to have
implemented warning and critical levels for performance counters. I have an
alternative implementation that does it, along with some sanity checking of the
parameters needed to use -v COUNTER.
</SPAN></FONT></FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><SPAN
class=453121912-20082004><FONT><FONT face=Arial><SPAN
class=640144420-18082004><SPAN
class=453121912-20082004></SPAN></SPAN></FONT></FONT></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><SPAN
class=453121912-20082004><FONT><FONT face=Arial><SPAN
class=640144420-18082004><SPAN class=453121912-20082004>The patch I'm sending
solve both issues: it restores the divisor to 1 MB and implements warning and
critical levels for performance counters. Please
evaluate.</SPAN></SPAN></FONT></FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><SPAN
class=453121912-20082004><FONT><FONT face=Arial><SPAN
class=640144420-18082004><SPAN
class=453121912-20082004></SPAN></SPAN></FONT></FONT></SPAN></SPAN></SPAN> </DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><SPAN
class=453121912-20082004><FONT><FONT face=Arial><SPAN
class=640144420-18082004><SPAN
class=453121912-20082004>[]'s</SPAN></SPAN></FONT></FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><SPAN
class=453121912-20082004><FONT><FONT face=Arial><SPAN
class=640144420-18082004><SPAN
class=453121912-20082004>Paulo</SPAN></SPAN></FONT></FONT></SPAN></SPAN></SPAN></DIV>
<DIV><SPAN class=250192614-19082004><SPAN class=250192614-19082004><SPAN
class=453121912-20082004><FONT><FONT face=Arial><SPAN
class=640144420-18082004><SPAN
class=453121912-20082004></SPAN></SPAN></FONT></FONT></SPAN></SPAN></SPAN></FONT></SPAN> </DIV></DIV>
<DIV align=left><FONT face=v size=2><STRONG>Paulo Afonso Graner
Fessel</STRONG></FONT></DIV>
<DIV align=left><EM><FONT size=1>Administrador de Ambiente e Sistemas
UNIX</FONT></EM></DIV>
<DIV align=left><FONT size=1>
<DIV align=left><FONT size=1><A
href="mailto:paulo.fessel@primesys.com.br">paulo.fessel@primesys.com.br</A></FONT></DIV>OWT</FONT></DIV>
<DIV align=left><FONT size=1>Fone: +55 (11) 3038-6464</FONT></DIV>
<DIV align=left><FONT size=1>Fax: +55 (11) 3038-6508</FONT></DIV>
<DIV align=left><FONT size=1><A
href="http://www.primesys.com.br/">http://www.primesys.com.br</A></FONT></DIV>
<DIV align=left> </DIV>
<DIV align=left><IMG id=_x0000_i1025 height=67 src="cid:453121912@20082004-2F14"
width=110 border=0></DIV>
<DIV align=left> </DIV>
<DIV> </DIV></BODY></HTML>