nagios-cvs: Too many open files?
Ethan Galstad
nagios at nagios.org
Thu Feb 8 18:26:22 CET 2007
Gerd Mueller wrote:
>> I should have mentioned that all of my hosts and services are passiv. Maybe "passive host bug" wasn't completly solved :).
>
> Now I am sure it also happens on active services/hosts.
>
> Much too much files:
>
> nag179:/tmp# rm nagios*
> -bash: /bin/rm: Argument list too long
>
> Gerd
>
I think there are two problems here:
1. Too many physical temp files.
2. Too many open files that were deleted files, but still have kernel
references
For #1, could you sort the files by modification time and see how they
look. If you've got a lot of "old" files (> 1 hour), there' a problem.
Some of these older files are normal, as I've mentioned before, and
its best to run something like tmpwatch on the directory to remove them.
For #2...
lsof reports a number of temp files that are still open, but were
deleted. You can see if this is your problem by running:
lsof | grep nagios | grep DEL
I did some digging and this was caused by mmap() and munmap() when
Nagios encountered a temp file of 0 byte size, which will happen when
checks have no output. I changed the code to skip mmap()ing altogether
when it encounters 0 byte files, and that solved the problem for me. A
patch will be in CVS shortly for this...
Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
More information about the Developers
mailing list