Hi Team ,
We are using a script check_open_files.pl to check the number of open files on a linux server ( Rhel 6 ) .
We are quite unsure on how the calculation is done here and what values to be given as warning and critical .
Right now this is the setup and we are not sure why it is throwing a critical error .
[nagios@xyz ~]$ /usr/local/nagios/libexec/check_nrpe -H server -t 120 -c check_open_files -a '-w 1.29 -c 1.55'
CRITICAL: open files (36064) exceeds (threshold=25111/25111)|open_files=36064;20899;25111
Please help us in understanding how the calculation works
check_open_files.pl
Re: check_open_files.pl
Hi
The w and c parameters are the warning and critical levels expressed in %
of the max open file limit. So the settings you have are quite low.
Here is an example, I list the system setting for max open files and then I run the check_open_files.pl
command with warning at 80% and critical at 90%
80% of 183612 = 146889
90% 0f 183612 = 165250
So you can see the command returning the actual %, warning % and critical % :
opened_files=2912;146889;165250
Please let me know if this makes sense to you or not.
Thanks
The w and c parameters are the warning and critical levels expressed in %
of the max open file limit. So the settings you have are quite low.
Here is an example, I list the system setting for max open files and then I run the check_open_files.pl
command with warning at 80% and critical at 90%
Code: Select all
[root@gs-cent7-23-94 libexec]# cat /proc/sys/fs/file-max
183612
[root@gs-cent7-23-94 libexec]# ./check_open_files.pl -w 80 -c 90
OK: 2912 open files (1% of max 183612)|opened_files=2912;146889;16525090% 0f 183612 = 165250
So you can see the command returning the actual %, warning % and critical % :
opened_files=2912;146889;165250
Please let me know if this makes sense to you or not.
Thanks