<div class="gmail_quote">On Fri, Jun 8, 2012 at 1:53 PM, Parkman, Mikhail <span dir="ltr"><<a href="mailto:Mikhail_Parkman@cable.comcast.com" target="_blank">Mikhail_Parkman@cable.comcast.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">








<div>
<font face="Calibri"><span style="font-size:11pt">
<div>Thanks - I decided to go with <a href="http://check_open_files.pl" target="_blank">check_open_files.pl</a></div>
<div><a href="http://exchange.nagios.org/directory/Plugins/Uncategorized/Operating-Systems/Linux/check-open-files/details" target="_blank"><font color="blue"><u>http://exchange.nagios.org/directory/Plugins/Uncategorized/Operating-Systems/Linux/check-open-files/details</u></font></a></div>


<div> </div>
<div>I didn't find help_me/read_me info for this plugin.</div>
<div>After I installed it on the target box into /usr/local/nagios/libexec and just executed it, I got:</div>
<div>----------</div>
<div>[root@target_host libexec]# ./<a href="http://check_open_files.pl" target="_blank">check_open_files.pl</a></div>
<div>Usage:  -w <warn> -c <crit> [-t <timeout>] [-v version] [-h help]</div>
<div>[root@target_host libexec]#</div>
<div>======</div>
<div>That told me that I should run it at least with "-w some_value1 -c some_value2"</div>
<div>Then I tried to run it with different -w -c values and I am not clear why I am getting different threshold values (bold, red) :</div>
<div>===============</div>
<div>[root@ target_host libexec]# ./<a href="http://check_open_files.pl" target="_blank">check_open_files.pl</a>  -w 500 -c 10000</div>
<div>OK: open files (4590) is below threshold (<font color="red"><b>16194515/323890300</b></font>)|open_files=4590;<font color="red"><b>16194515;323890300</b></font></div>
<div>[root@ target_host libexec]# ./<a href="http://check_open_files.pl" target="_blank">check_open_files.pl</a> -w 1000 -c 10000</div>
<div>OK: open files (4590) is below threshold (<font color="red"><b>32389030/323890300</b></font>)|open_files=4590;<font color="red"><b>32389030;323890300</b></font></div>
<div>[root@ target_host libexec]# ./<a href="http://check_open_files.pl" target="_blank">check_open_files.pl</a> -w 10 -c 100</div>
<div>OK: open files (4590) is below threshold (<font color="red"><b>323890/3238903</b></font>)|open_files=4590;<font color="red"><b>323890;3238903</b></font></div>
<div>===============</div>
<div>Why do I get in response 2 threshold values and why are they different each time I enter another number of warning and critical limits?</div></span></font></div></blockquote><div><br></div><div>Clearly, in general terms compared to other plugins:</div>

<div><br></div><div>1) you're getting "OK" because 4590 is less than the thresholds you've set; had it exceeded 323890 (in the -w10 example) then you'd get WARN, and if it exceeded the other, an ERROR response.  The actual thresholds are returned back because they are based on a calculation, and when the values are below, but the suer thinks they shouldn't be, the Nagios/Icinga screen would show the ref values as well as a comment.</div>

<div><br></div><div>2) your question as to why the numbers change might be more complex than I'm reading, but it's clearly taking % of total system files as a threshold:</div><div><br></div><div>-w 500 --> 500% of (cat /proc/sys/fs/file-max) ==> 16194515</div>

<div>-c 10000 --> 10000% of (cat /proc/sys/fs/file-max) ==> 323890300 </div><div><br></div><div>Have I misread your question(s)?</div><div><br></div><div>I would suggest you set your thresholds to alarm on percentages; I'm not sure 50% and 80% are good numbers, but "-w 50 -c 80" would achieve those.</div>

<div><br></div><div>Allan</div><div>-- </div></div><a href="mailto:allanc@chickenandporn.com" target="_blank">allanc@chickenandporn.com</a>  "金鱼" <a href="http://linkedin.com/in/goldfish" target="_blank">http://linkedin.com/in/goldfish</a><br>