[Nagiosplug-devel] Patch for completeness on check_nt plugin
Ton Voon
tonvoon at mac.com
Mon Aug 23 15:07:12 CEST 2004
Paulo, Garry,
This has now been applied to CVS. I wouldn't worry about the
technicalities of which is the "correct" value - this is what the
discussion list is for!
Paulo, Thanks for the patch. I've committed it almost verbatim. I've
only made a slight change to the comments (we are trying to avoid using
// and use /* */ instead - see the development guidelines at
http://nagiosplug.sourceforge.net/developer-guidelines.html). I've also
removed your copyright line from the CHECK_COUNTER code (the developer
guidelines has a section on the reasons). If you are uncomfortable with
this, then I can reverse the change.
Ton
On 20 Aug 2004, at 13:28, 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."
>
> 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.
>
> 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.
>
> []'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
>
> <image.tiff>
>
> <LogoPrimesys.gif><check_nt.perfdata.newpatch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 5096 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20040823/0fdf941f/attachment.bin>
More information about the Devel
mailing list