[Nagiosplug-devel] Patch for completeness on check_nt plugin

Paulo Afonso Graner Fessel paulo.fessel at primesys.com.br
Fri Aug 20 08:35:45 CEST 2004


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 <http://www.primesys.com.br/> 
 
 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20040820/0e4d9efc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LogoPrimesys.gif
Type: image/gif
Size: 2173 bytes
Desc: LogoPrimesys.gif
URL: <http://nagios-plugins.org/archive/devel/attachments/20040820/0e4d9efc/attachment.gif>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_nt.perfdata.newpatch
Type: application/octet-stream
Size: 8007 bytes
Desc: check_nt.perfdata.newpatch
URL: <http://nagios-plugins.org/archive/devel/attachments/20040820/0e4d9efc/attachment.obj>


More information about the Devel mailing list