Re: [Nagios-devel] nagios-cvs: Too many open files?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] nagios-cvs: Too many open files?

Post by Guest »

Gerd Mueller wrote:
>> Gerd, the number of temp files is extremely high. How many Nagios
>> (child) processes are running when you check the count of temp files?
>> Something seems to be amiss. Either that or you're monitoring a ton of
>> services.18837 pts/0 S+ 0:00 grep ssh
>
> Hm, a lot of them are are critical/down.
>
>
> nag01:/root# lsof | grep "/tmp/nagios" | wc -l
> 766
>
>
> nag01:/root# lsof | grep "/tmp/nagios" | wc -l
> 774
>
>
> nag01:/root# ps ax | grep /usr/local/nagios/bin/nagios
> 4548 ? Rsl 0:13 /usr/local/nagios/bin/nagios
> -d /usr/local/nagios/etc/nagios.cfg
> 18133 ? S 0:00 /usr/local/nagios/bin/nagios
> -d /usr/local/nagios/etc/nagios.cfg
> 19028 ? S 0:00 /usr/local/nagios/bin/nagios
> -d /usr/local/nagios/etc/nagios.cfg
> 19248 ? S 0:00 /usr/local/nagios/bin/nagios
> -d /usr/local/nagios/etc/nagios.cfg
> 19760 pts/0 S+ 0:00 grep /usr/local/nagios/bin/nagios
>
>
> nag01:/root# ps ax | grep /usr/local/nagios/bin/nagios -c
> 6
>
> nag01:/root# lsof | grep "/tmp/nagios" | wc -l
> 5737
> nag01:/root# ps ax | grep libexc -c
> 1
>
>
> Gerd
>


What do you get when you run the following command?

dir /usr/local/nagios/tmp/nagios* | wc -l


LSOF returns entries for files that have already been deleted on my
system...

nagios 4034 nagios DEL REG 3,1 1141972
/usr/local/nagios/tmp/nagios2e8Q7h


Looks like the kernel must keep references to these files even after
they've been removed. This appears to be true based on an article I
just found:

http://www.linux.com/article.pl?sid=06/10/30/1652211

There's probably a way to tweak the kernel's behavior into immediately
releasing these files once they've been deleted. Normally the kernel
keeps references to deleted files in memory (at least for a while) until
the process that deleted them exits.

Any kernel gurus out there have a solution to this?


Ethan Galstad,
Nagios Developer
---
Email: [email protected]
Website: http://www.nagios.org





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked