[Nagiosplug-devel] Patch for completeness on check_nt plugin
Cook, Garry
GWCOOK at mactec.com
Fri Aug 20 09:21:07 CEST 2004
Paulo Afonso Graner Fessel wrote:
> I've looked at code of check_nt.c and there's this remark:
>
> // Changed divisor in following line from v to 3044515 to accurately
> reflect memory size
>
> This is incorrect. The memory size that check_nt reports is a sum of
> RAM and pagefile sizes, as defined here:
>
> "Commit Charge: 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.
>
> "Windows Task Manager displays the commit charge in its Performance
> tab. There are three memory readings, measured in kilobytes:
>
> * Total: refers to the total amount of physical and virtual memory
> the computer is using at that moment.
> * Limit: refers to the combined limit of both the physical memory and
> the allocated virtual memory.
> * Peak: refers to the highest total system memory usage during the
> session in which you are using the computer.
>
> "The commit charge will increase when applications are opened and
> used and decrease when applications are closed."
OK, I probably should not have made that change, as I was really
patching to add performance data. I guess I should know better and stick
to changing one thing at a time. However, I did not find this
information in the docuementation, and the original values for the
MEMUSE check were quite confusing. The change that I made properly
reported MEMUSE on my sytems, and as mentioned in the code comments, I
was not sure that it was the correct thing to do.
Is the information that you've provided above in the NSClient docs
somewhere? If so, please let me know and I'll read them again.
> 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.
If MEMUSE is actually checking Commit Charge, then I think that the
source of the confusion lies in the name of the check. Your point is
still valid, and my change should be reversed to it's original value.
However, I think that perhaps the name of the check needs to be updated
as well, and details on how to actually check physical RAM should be
included, if not already in the documentation.
> 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.
>
> Also, the 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.
> 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.
I don't check any counters, so wouldn't have been able to test the
addition of perfdata for these. Thanks for following up on that, if it
works well I'm sure that it will add value to the plugin.
> []'s
> Paulo
>
> Paulo Afonso Graner Fessel
> Administrador de Ambiente e Sistemas UNIX
> paulo.fessel at primesys.com.br
> OWT
> Fone: +55 (11) 3038-6464
> Fax: +55 (11) 3038-6508
> http://www.primesys.com.br
Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 720.220.1862 (Mobile)
More information about the Devel
mailing list